[Top][All Lists]

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

Re: editfiles and pattern matching

From: Chip Seraphine
Subject: Re: editfiles and pattern matching
Date: Tue, 15 Jul 2003 09:14:19 -0500
User-agent: Mozilla/5.0 (X11; U; SunOS i86pc; en-US; rv:1.2.1) Gecko/20030121

The only thing wierd about it is an implicit '^' at the start and '$' at the end. If you want to override that, toss a '.*' before or after your pattern. Not sure why Mark chose this approach, but I would assume the engine doesn't like multiline matches and the implied boundaries discourage people from trying it.

That being said, it really isn't wacky enough to get a grass-roots movement started over it :-) I think most of us are sufficiently used to it that it falls under 'desired behavior', even if it surprised us the first time around...

Ferguson, Steve wrote:
Thanks! This seems to do what I want.

The larger question: Is there any reason a pattern match must apply to the
entire line?  Is there any plan to make this work like most other regex
engines or is this the desired behavior?


-----Original Message-----
From: skaar [mailto:address@hidden
Sent: Monday, July 14, 2003 2:46 PM
To: Ferguson, Steve
Cc: 'address@hidden'
Subject: Re: editfiles and pattern matching

   # Ensure cfengine port is declared in /etc/services
   { /etc/services
SetLine "cfengine 5308/tcp #

cfengine port"

     AppendIfNoLineMatching "^cfengine"

try to match the entire line "^cfengine.*"

Help-cfengine mailing list

reply via email to

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