Paul Schmehl wrote:
 > --On Tuesday, May 20, 2008 17:36:26 -0500 Paul Schmehl <[EMAIL PROTECTED]> 
 > wrote:
 > > if ( ${BATCH} ); then
 > > [...]
 > > 1: not found
 > 
 > Never mind....forgot to use [ ] for test instead of ( ).

If the value of $BATCH is always either 0 and 1, a neat
trick is to define two shell functions:

0() { false; }
1() { true; }

Then you can savely write:

if ( $BATCH ); then

Or even:

if $BATCH; then

Best regards
   Oliver

-- 
Oliver Fromme, secnetix GmbH & Co. KG, Marktplatz 29, 85567 Grafing b. M.
Handelsregister: Registergericht Muenchen, HRA 74606,  Geschäftsfuehrung:
secnetix Verwaltungsgesellsch. mbH, Handelsregister: Registergericht Mün-
chen, HRB 125758,  Geschäftsführer: Maik Bachmann, Olaf Erb, Ralf Gebhart

FreeBSD-Dienstleistungen, -Produkte und mehr:  http://www.secnetix.de/bsd

"Clear perl code is better than unclear awk code; but NOTHING
comes close to unclear perl code"  (taken from comp.lang.awk FAQ)
_______________________________________________
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to "[EMAIL PROTECTED]"

Reply via email to