Skip to content

Instantly share code, notes, and snippets.

@hunner
Created November 17, 2011 22:11
Show Gist options
  • Save hunner/1374708 to your computer and use it in GitHub Desktop.
Save hunner/1374708 to your computer and use it in GitHub Desktop.
[root@tdc00demo ~]# cat /etc/settings.php
<?php
$db_url = 'mysqli://user:pass@host/database';
?>
[root@tdc00demo ~]# cat settings_php.augtool
set /augeas/load/Phpvars/incl[last()+1] "/etc/settings.php"
load
[root@tdc00demo ~]# augtool --noload -if settings_php.augtool
augtool> print /augeas/load/Phpvars
/augeas/load/Phpvars
/augeas/load/Phpvars/lens = "@Phpvars"
/augeas/load/Phpvars/incl[1] = "/etc/squirrelmail/config.php"
/augeas/load/Phpvars/excl[1] = "*.augnew"
/augeas/load/Phpvars/excl[2] = "*.augsave"
/augeas/load/Phpvars/excl[3] = "*.dpkg-dist"
/augeas/load/Phpvars/excl[4] = "*.dpkg-bak"
/augeas/load/Phpvars/excl[5] = "*.dpkg-new"
/augeas/load/Phpvars/excl[6] = "*.dpkg-old"
/augeas/load/Phpvars/excl[7] = "*.rpmsave"
/augeas/load/Phpvars/excl[8] = "*.rpmnew"
/augeas/load/Phpvars/excl[9] = "*~"
/augeas/load/Phpvars/incl[2] = "/etc/settings.php"
augtool> print /files/etc/settings.php
augtool> ls /files/etc/settings.php
augtool> get /files/etc/settings.php
/files/etc/settings.php (o)
augtool>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment