In trying to use ExecResult to do some manipulation of lists, I found
some interesting and unexpected results.

The variable in this example:

someresult = ( ExecResult(/bin/sh "/bin/echo baz|/bin/sed -e
\"s/^\(.*\)$/&.conf/g\"") )

is set to:

<$/&.conf/g\"")>

Thats delimited with the angle brackets for clarity.

I've tried various combinations of quoting and backslash-escaping here,
but its not working.


For reference, the original, commandline looks like this:
/bin/echo baz|sed -e "s/^\(.*\)$/&.conf/g"

My question, then, is how (apart from using an actual script in a file)
does one quote and escape such an expression to fit it into ExecResult?

I get the feeling that the problem is somehow in the way that cfengine
parses the parentheses, even though they are within double quotes,
passed to a shell.

-- 
"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

_______________________________________________
Help-cfengine mailing list
Help-cfengine@gnu.org
http://lists.gnu.org/mailman/listinfo/help-cfengine

Reply via email to