Re: NOBUG - er, at least regarding double tabs.

Paul Krizak <[email protected]>
Newsgroups gmane.comp.sysutils.cfengine.bugs,gmane.comp.sysutils.cfengine.general
Message-ID <[email protected]>
I notice you've got asterisks in some of your regexes:

 > */10^I*^I*^I*^I*^Iroot^I/usr/local/bin/bsdsar_gather$

Remember that in regex-ese, asterisk means "zero or more of the previous 
entity".  So "^I*^I" means "zero or more tabs, followed by a tab. 
Double-tabs will get swallowed up by the greedy regex.  You probably 
need to escape the asterisks.

Also, you should use ${tab} to make it all more readable!!

Paul Krizak                         7171 Southwest Pkwy MS B400.2A
Advanced Micro Devices              Austin, TX  78735
Linux/Unix Systems Engineering      Desk:  (512) 602-8775
Silicon Design Division             Cell:  (512) 791-0686


Jo Rhett wrote:
> On Mar 28, 2008, at 12:02 PM, Paul Krizak wrote:
>> And it worked fine.
> ...
>> And that worked fine too.
> 
> Dangit, you're right.  I dropped some stuff in copy/paste.  FARG!
> 
> Well, here are the lines which won't match no matter what. And I'm 
> having a devil of a time producing a test case for this problem.  But 
> it's real.  The same lines work without double tabs...
> 
> jrhett@arran 46$ cat -vet testfile
> */10^I*^I*^I*^I*^Iroot^I/usr/local/bin/bsdsar_gather$
> 0^I2^I*^I*^I*^Iroot^I/usr/sbin/freebsd-update cron$
> 0^I*^I*^I*^I*^Iroot^I/usr/local/sbin/cfexecd -F$
> 0^I^I2^I*^I*^I*^Iroot^I/usr/sbin/freebsd-update cron$
> 0^I^I*^I*^I*^I*^Iroot^I/usr/local/sbin/cfexecd -F$
> 
> jrhett@arran 47$ cat -t cfagent.conf
> 
> control:
> ^Iactionsequence^I= ( editfiles )
> 
> editfiles:
> ^I{ /home/jrhett/test/testfile
> ^I^IDeleteLinesMatching 
> "^0^I^I2^I*^I*^I*^Iroot^I/usr/sbin/freebsd-update cron"
> ^I^IDeleteLinesMatching "^0^I^I*^I*^I*^I*^Iroot^I/usr/local/sbin/cfexecd 
> -F"
> ^I}
> 
> jrhett@arran 48$ cfagent -qIf ./cfagent.conf
> cfengine:arran: Couldn't find a private key 
> (/home/jrhett/.cfagent/ppkeys/localhost.priv) - use cfkey to get one
> jrhett@arran 49$ cat -vet testfile
> */10^I*^I*^I*^I*^Iroot^I/usr/local/bin/bsdsar_gather$
> 0^I2^I*^I*^I*^Iroot^I/usr/sbin/freebsd-update cron$
> 0^I*^I*^I*^I*^Iroot^I/usr/local/sbin/cfexecd -F$
> 0^I^I2^I*^I*^I*^Iroot^I/usr/sbin/freebsd-update cron$
> 0^I^I*^I*^I*^I*^Iroot^I/usr/local/sbin/cfexecd -F$
>
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.