Common patterns

This page lists useful common patterns to help developing Augeas lenses. Most of these lenses could probably be included into generic modules to be called from new modules later on.


Contents

Ini file

Format example

# This is an Ini file

[SECTION1]
field1 = value1
# another comment 

[section2]
# a third comment
field2 = value2

Example implementation

There is a generic module for Ini files on Generic_modules/IniFile.

Logrotate / xinetd

Format example

Example implementation

Comments

Comments are one of the hardest patterns to deal with in Augeas. See the Dealing with comments page for more information.

MediaWiki
GNU Free Documentation License 1.2