[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: getting a solid result from an ExecResult...
From: |
Mark . Burgess |
Subject: |
Re: getting a solid result from an ExecResult... |
Date: |
Thu, 5 Sep 2002 20:19:01 +0200 (MET DST) |
For security reasons, cfengine doesn't use a shell here by
default, that's why Adrian's suggestion worked.
M
On 5 Sep, Doug Nordwall wrote:
> I'm trying to do the following
>
> myVar = (ExecResult (/bin/grep astring ${myFile}) )
>
> Now, this does return the result, save that the grep finds 3 instances,
> and it appears that cfengine ignores the \n's on the end and strings
> all the results together. Fine, I say, to myself , I'll work around it,
> so I do things like
>
> myVar1 = (ExecResult (/bin/grep astring ${myFile} | /usr/bin/head -1) )
> myVar2 = (ExecResult (/bin/grep astring ${myFile} | /usr/bin/head - 2 |
> /usr/bin/tail -1) )
>
> Oddly, the second line seems to break cfengine. None of them appear to
> work correctly.
>
> Has anyone gotten something like this to work?
>
> --Doug Nordwall
>
>
>
> _______________________________________________
> Help-cfengine mailing list
> Help-cfengine@gnu.org
> http://mail.gnu.org/mailman/listinfo/help-cfengine
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Work: +47 22453272 Email: Mark.Burgess@iu.hio.no
Fax : +47 22453205 WWW : http://www.iu.hio.no/~mark
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~