help-cfengine
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: How to use regex in editfiles?


From: Josef Wolf
Subject: Re: How to use regex in editfiles?
Date: Tue, 31 Aug 2004 22:05:58 +0200
User-agent: Mutt/1.4.1i

On Tue, Aug 31, 2004 at 01:56:49PM -0700, Wil Cooley wrote:
> On Sun, 2004-08-29 at 00:47 -0500, Frank Smith wrote:
> 
> > Try this instead:
> > 
> > AppendIfNoLineMatching "cfengine[[:blank:]]5308/tcp.*"
> > 
> > which should also match lines with trailing spaces and/or comments.
> 
> What I don't understand is why the .* are necessary--why does the regex
> have to match the whole line instead of a substring?  They aren't for
> other regex implementations.  I guess I could see a safety issue with
> it...

Maybe this is a safety measure.  But the it needs to be properly documented
since it is a big change to any other regex implementation in the world.

-- 
Please visit and sign and http://www.ffii.org
-- Josef Wolf -- jw@raven.inka.de --




reply via email to

[Prev in Thread] Current Thread [Next in Thread]