help-cfengine
[Top][All Lists]
Advanced

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

Re: ReturnsZero(): command does not return zero. Is class created with v


From: Systems Administrator
Subject: Re: ReturnsZero(): command does not return zero. Is class created with value of false?
Date: Wed, 1 Oct 2003 15:16:51 +1000 (EST)

On Wed, 1 Oct 2003 Mark.Burgess@iu.hio.no wrote:

>
> I'm sorry -- I didn't read this properly first time
> around. the problem is a misunderstanding of the ReturnZero()
> function. It is the value of the shell returncode that is tested
> not the value of the text string printed by the command.
> You will need to use StrCmp("0",$returnvar) if you want to test that.

        Hopefully you'll forgive a newbie question.  But first, let me
state what I understand you to be implying.  If I understad, you're saying
that the StrCmp works assuming that the text output of the fgrep is in the
variable $returnvar.
        Now for the question: is $returnvar a special variable that is set
to the output of the previous shell command?  If not, then how do I set
it?  I've looked in the likely places I could find in the manual, and
couldn't find anything.

        Thanks,


--
Tim Nelson
Systems Administrator
Sunet Internet
Tel: +61 3 5241 1155
Fax: +61 3 5241 6187
Web: http://www.sunet.com.au/
Email: sysadmin@sunet.com.au






reply via email to

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