[Top][All Lists]

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

Re: quoting and parentheses in ExecResult?

From: Steve Wray
Subject: Re: quoting and parentheses in ExecResult?
Date: Wed, 17 Aug 2005 08:10:38 +1200
User-agent: Mozilla Thunderbird 0.9 (X11/20041103)

Knut Auvor Grythe wrote:
> On Mon, Aug 15, 2005 at 01:12:44PM +1200, Steve Wray wrote:
> Maybe you can try the magic (and horrific) quotes only-syntax? Just be
> sure to write a comment about what it does. I believe the syntax is
> something like this:
> someresult = ( "exec /bin/sh -c '/bin/echo baz|/bin/sed -e 
> \"s/^\(.*\)$/&.conf/g\"'" )

This Works!!!

> If I remember correctly, "exec /" in the beginning of the string makes
> it get evaluated instead of just copied. And yes, the '/' is important.
> I find this syntax quite horrible, since it differs so much from the
> rest of cfengine, so you should probably sheck out Marks new patch
> before even considering it.

ah well I don't know whether this works on the previous version, can't
test that right now... but my original problem still occurs with the new

>>the -c yes, but I'm not sure what you mean by 'unecessary parentheses'.
>>They are required for the '&' reference to work.
> No, they are required for \1 to work. '&' is always the entire match.

wow, well through this 'bug' I have learnt something about sed. Whatever
frustrates you only makes you stronger, like they say! ;)

"Politics is the art of looking for trouble, finding it, misdiagnosing
it, and then misapplying the wrong remedies." - Groucho Marx

Attachment: signature.asc
Description: OpenPGP digital signature

reply via email to

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