[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
defining classes based on returning results of (shell) commands?
From: |
Josh Smith |
Subject: |
defining classes based on returning results of (shell) commands? |
Date: |
Wed, 23 Aug 2006 19:54:17 -0400 |
RT == Robinson Tiemuqinke <hahaha_30k@yahoo.com>
RT> But what I?d like to have is something like the
RT> following:
RT>
RT> strCmpReturn(identificationString, command)
RT>
RT> True if the named shell command returns with
RT> (exactly) the identificationString(or number).
If nothing else, you could wrap it in a tiny script that parses the output
of that command, and exits with an exit status of zero if and only if the
string matches what you expect, and then check that with ReturnsZero. In
fact, something as simple as
#!/bin/bash
[ $($1) = $2 ]
should do the trick...
-Josh (josh@upromise.com)