help-cfengine
[Top][All Lists]
Advanced

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

Re: defining classes based on returning results of (shell) commands?


From: Mark Burgess
Subject: Re: defining classes based on returning results of (shell) commands?
Date: Thu, 24 Aug 2006 07:57:45 +0200
User-agent: Thunderbird 1.5.0.5 (X11/20060725)

Robinson Tiemuqinke wrote:
> Hi,
> 
>  If there are any ways to define groups/classes with
> the return results of (shell) commands? Currently
> there is a function called ReturnZero can be used to
> define classes based on exit code, like explained in
> the online reference:
> 
> ReturnsZero(command) 
> True if the named shell command returns with exit code
> zero (success). 
> 
>  But what I’d like to have is something like the
> following:
> 
>  strCmpReturn(identificationString, command)
> 
>       True if the named shell command returns with
> (exactly) the identificationString(or number).
> 
>  If there is already a function like the above? If
> not, anyone can suggest another way to workaround it?
> 
> Thanks a lot.

First you get the outputs into variables and then Use RegCmp().

M



-- 
Mark Burgess

Professor of Network and System Administration
Oslo University College

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Work: +47 22453272            Email:  address@hidden
Fax : +47 22453205            WWW  :  http://www.iu.hio.no/~mark
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~




reply via email to

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