help-cfengine
[Top][All Lists]
Advanced

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

usage question


From: Ian McNish
Subject: usage question
Date: Wed, 11 Oct 2000 11:49:10 -0700 (PDT)

i'm trying to comment out two lines in a file, but i;m having problems
matching the line(s). the lines are:

echo "hey there buddy: ${buddy}: ${bobby}" | \
        "${buddy}"


it's a big file, with more than one line starting with echo, blank
lines before and after these two lines. the biggest problem is that
there isn't and constant place in the file where these lines will
appear, in some iterations of the file they may be near the top, while
other times they may be near the bottom. to match these i've tried:

LocateLineMatching "*hey there buddy:*"
CommentNLines "2"


which gives the error:

cfengine:jump04: Regular expression error for *hey there buddy:*
cfengine:jump04: regcomp: No such file or directory
cfengine:jump04: LocateLineMatchingRegexp failed in /tmp/billy, aborting editing
cfengine:jump04: End editing /tmp/billy




and i've tried:

LocateLineMatching 'echo "hey there buddy:*'                                    
       
CommentNLines "2"


which gives the error:

Edit: Search for echo "hey there buddy:*
failed. Current line still 1
cfengine:jump04: LocateLineMatchingRegexp failed in /tmp/billy,
aborting editing
cfengine:jump04: End editing /tmp/billy


seeing that this approach wasn't working i tried using
CommentLinesContaining and HashCommentLinesContaining, but i realized
that these two command were not leaving the current line marker on the
line they did work on, so then i couldn't get the second line
commented out.


what am i doing wrong? cfengine really needs a command
'LocateLineContaining'.




reply via email to

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