Forum: Cfengine Help
Subject: Re: Newbie Needs help with regular expression
Author: neilhwatson
Link to topic: https://cfengine.com/forum/read.php?3,21706,21708#msg-21708
Try this.
bundle agent foo {
files:
"/tmp/yourfile"
edit_line => search_replace(
"^ifconfig_lm2=\"up\"\s*",
"ifconfig_lm2=\"up mtu 9000\""
);
}
bundle edit_line search_replace(string1, string2) {
replace_patterns:
"${string1}"
replace_with => replace_last("${string2}");
}
_______________________________________________
Help-cfengine mailing list
[email protected]
https://cfengine.org/mailman/listinfo/help-cfengine