What I'm trying to do is to parse an MRTG config file, which has lines in this format:
Directive[targetname]: value for some Directive, targetname and value. This would be relatively easy to parse into a format of ./Directive/targetname=value However, due to the nature of the configuration file, I'd like it to appear in the /files tree in the format ./targetname/Directive = value I can't see a way to do this, since Augeas appears to process the file strictly in one direction only. I've thought about if the regexp positional variables were available with some sort of pre-parsing it might work - [ preparse /([a-z]+)\[(a-z)+\]/ . key $2 . [ key $1 . value ] ] . but of course this doesn't work. Can anyone let me know of a way to achieve this? I can't find anything in the documentation that seems to do what I need. Thanks in advance. Steve _____ Steve Shipway [email protected] Routers2.cgi web frontend for MRTG/RRD; NagEventLog Nagios agent for Windows Event Log monitoring; check_vmware plugin for VMWare monitoring in Nagios and MRTG; and other Open Source projects. Web: http://www.steveshipway.org/software P Please consider the environment before printing this e-mail
_______________________________________________ augeas-devel mailing list [email protected] https://www.redhat.com/mailman/listinfo/augeas-devel
