Hi Sluggers, I am trying to convert (declare?) a string to an integer. the snippet goes something like this:
# grepstuff and totalerrors are functions earlier. ERRORNUM=`grepstuff $LOGTMP |totalerrors`
echo $STATUS echo "$ERRORNUM"
#this prints 54 which is the correct string value of $ERRORNUM
#if (( "ERRORNUM" >= 1 )) if [ "$ERRORNUM" != 0 ]
try using () instead of []
if ( $ERRORNUM != 0 )
Fil -- SLUG - Sydney Linux User's Group Mailing List - http://slug.org.au/ Subscription info and FAQs: http://slug.org.au/faq/mailinglists.html
