On Mon, Feb 16, 2004 at 10:13:28 +1100, David Kempe wrote: > echo "$ERRORNUM" > > #this prints 54 which is the correct string value of $ERRORNUM > > #if (( "ERRORNUM" >= 1 )) > if [ "$ERRORNUM" != 0 ]
!= is a string operator. You want to do a numeric comparison: arg1 OP arg2 Arithmetic tests. OP is one of -eq, -ne, -lt, -le, -gt, or -ge. Arithmetic binary operators return true if ARG1 is equal, not-equal, less-than, less-than-or-equal, greater-than, or greater-than-or-equal than ARG2. (output is from "help test"). Cheers, John -- whois [EMAIL PROTECTED] GPG key id: 0xD59C360F http://kirriwa.net/john/ -- SLUG - Sydney Linux User's Group Mailing List - http://slug.org.au/ Subscription info and FAQs: http://slug.org.au/faq/mailinglists.html