help-cfengine
[Top][All Lists]
Advanced

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

Re: getting a solid result from an ExecResult...


From: Adrian Phillips
Subject: Re: getting a solid result from an ExecResult...
Date: 05 Sep 2002 18:00:20 +0200
User-agent: Gnus/5.09 (Gnus v5.9.0) Emacs/21.2

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




reply via email to

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