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: [EMAIL PROTECTED] Fax : +47 22453205 WWW : http://www.iu.hio.no/~mark ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ _______________________________________________ Help-cfengine mailing list [email protected] http://lists.gnu.org/mailman/listinfo/help-cfengine
