Knut Auvor Grythe wrote: > On Wed, Aug 17, 2005 at 07:56:58AM +0200, Mark Burgess wrote: > >>>Well, when I say *exactly* I mean: >>> >>> >>>>$(dollar)/&.conf/g\"")> >> >>But this does not have balanced quotes or parentheses, so it doesn't >>make much sense to me. You can't have a semi-quoted exoression >>in any language.. > > > The problem is, as far as I can see, this: > > You have your weird oneliner with parentheses in it: > > someresult = ( ExecResult(/bin/sh "/bin/echo baz|/bin/sed -e > \"s/^\(.*\)$/&.conf/g\"") ) > > cfengine starts parsing it, and finds "ExecResult(". Okay, it thinks, > It'll Have to find the matching parenthesis. So it scans through the > string until it finds one. It finds one in the middle of the oneliner, > about here:
I am thinking that this could also explain why its important to use curly braces instead of parentheses when you want to use cfengine variables in ExecResults. For example, given: sh = ( "/bin/sh -c" ) this doesn't work: someresult = ( ExecResult($(sh) "/bin/echo baz") ) but this does: someresult = ( ExecResult(${sh} "/bin/echo baz") ) This has been noted on the mailing list some time ago. -- "Politics is the art of looking for trouble, finding it, misdiagnosing it, and then misapplying the wrong remedies." - Groucho Marx
signature.asc
Description: OpenPGP digital signature
_______________________________________________ Help-cfengine mailing list Help-cfengine@gnu.org http://lists.gnu.org/mailman/listinfo/help-cfengine