David,
Try echo'ing out the variable in angle brackets to see if it has a new line.
ie echo "<$ERRORNUM>"
If you get: ---------- <54
---------- Then you have a newline obviously.
You could always use 'tr' to delete the newline: $ERRORNUM=`echo $ERRORNUM | tr --delete '\n'` Might want test that first tho.
thanks Craig, thats very helpful. and tr is so much easier to understand than sed:
sed -e '/[,\|]$/{N;s/\n/ /;}'
ouch!
dave
-- SLUG - Sydney Linux User's Group Mailing List - http://slug.org.au/ Subscription info and FAQs: http://slug.org.au/faq/mailinglists.html