"Doug" == Doug Nordwall <doug@pnl.gov> writes:
Doug> I'm trying to do the following myVar = (ExecResult
Doug> (/bin/grep astring ${myFile}) )
Doug> Now, this does return the result, save that the grep finds 3
Doug> instances, and it appears that cfengine ignores the \n's on
Doug> the end and strings all the results together. Fine, I say,
Doug> to myself , I'll work around it, so I do things like
Doug> myVar1 = (ExecResult (/bin/grep astring ${myFile} |
Doug> /usr/bin/head -1) ) myVar2 = (ExecResult (/bin/grep astring
Doug> ${myFile} | /usr/bin/head - 2 | /usr/bin/tail -1) )
Doug> Oddly, the second line seems to break cfengine. None of
Doug> them appear to work correctly.
Doug> Has anyone gotten something like this to work?
try :-
ExecResult (/bin/sh -c "command | command")
Sincerely,
Adrian Phillips
--
Your mouse has moved.
Windows NT must be restarted for the change to take effect.
Reboot now? [OK]