Edit Configuration Files with Augeas

From Augeas site:

“Augeas is a configuration editing tool. It parses configuration files in their native formats and transforms them into a tree. Configuration changes are made by manipulating this tree and saving it back into native config files.”

Usage example

Below we select the shellvars lens with allow oar.conf manipulation

 augtool -t 'Shellvars incl /etc/oar/oar.conf'
   augtool> print /files/etc/oar/oar.conf/
   augtool> get /files/etc/oar/oar.conf/DB_TYPE
   /files/etc/oar/oar.conf/DB_TYPE = "mysql"
   augtool> set /files/etc/oar/oar.conf/DB_TYPE Pg
   augtool> save
   Saved 1 file(s)
wiki/augeas.txt · Last modified: 2014/11/03 15:44 by auguste
Recent changes RSS feed GNU Free Documentation License 1.3 Donate Powered by PHP Valid XHTML 1.0 Valid CSS Driven by DokuWiki