On 08/05/12 09:26, Luke Bigum wrote:
> Theoretically you should be able to do this:
>
> augtool> print /files/etc/logrotate.d/syslog/rule/file[. =~
> regexp("/var/log/mail")]
>
> ... but I can't get the Regular Expression function to work in augtool :-(
Very nearly. Try this:
augtool> print /files/etc/logrotate.d/syslog/rule/file[. =~
regexp("/var/log/mail.*")]
/files/etc/logrotate.d/syslog/rule/file[3] = "/var/log/maillog"
The regexps are anchored by default, so you need the .* to match
anything after "mail".
--
Dominic Cleal
Red Hat Consulting
m: +44 (0)7817 878113
--
You received this message because you are subscribed to the Google Groups
"Puppet Users" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to
[email protected].
For more options, visit this group at
http://groups.google.com/group/puppet-users?hl=en.