I've been finding myself more and more wanting to take an editfile action if and only if a line exists in a file. I know, I could hypothetically use LocateLineMatching, but I have lots of edits that need to be done to the file if and only if a certain line exists.
What I seem to be wanting is something along the lines of: BeginGroupIfLineMatching ... EndGroup In other words, a complement to the old standby of BeginGroupIfNoLineMatching I haven't figured out a reasonable method shy of using a class defined by a grep output to trigger this, and that becomes problematic for me when I go multi-platform. (Solaris requires /usr/xpg4/grep for grep -q, Linux has it internal, ...) Or is there some easy way I'm overlooking to do this? -- [EMAIL PROTECTED] Mark McCullough "To announce that there must be no criticism of the President, or that we are to stand by the President, right or wrong, is not only unpatriotic and servile, but is morally treasonable to the American public." (Theodore Roosevelt, 1918)
signature.asc
Description: This is a digitally signed message part
_______________________________________________ Help-cfengine mailing list [email protected] http://lists.gnu.org/mailman/listinfo/help-cfengine
