help-cfengine
[Top][All Lists]
Advanced

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

Re: Newbie Question regarding commenting out all the lines without hash


From: Mark . Burgess
Subject: Re: Newbie Question regarding commenting out all the lines without hash marks
Date: Wed, 26 Jun 2002 08:01:10 +0200 (MET DST)

On 25 Jun, Durham, Josh wrote:
> I'm very new to cfengine, but I am trying to basically comment every single 
> line out in a file, with the following:
> 
> editfiles:
>   { /etc/inetd.conf
>    HashCommentLinesMatching "^[^#]"
>   }
> 
> But this doesn't seem to do anything.  Running an egrep "^[^#]" 
> /etc/inetd.conf seems to work.  I'm using the latest cfengine, 2.0.3.
> 
> Any ideas how to do this right?
> 
> - Josh

Your regexp matches only two characters, you need to write

HashCommentLinesMatching "^[^#].*"

I expect,

Mark

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Work: +47 22453272            Email:  Mark.Burgess@iu.hio.no
Fax : +47 22453205            WWW  :  http://www.iu.hio.no/~mark
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~





reply via email to

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