> LINE=`cat /tmp/modemlist$$.tmp | grep -e $TMP 2>/dev/null | tail -1`
>
>$TMP contains a PID number which I need to grep out of the modemlist$$.tmp
>file but need to check with spaces eg.. " $TMP " to prevent numbers like
>43512 popping up when searching for 435 etc..
>
>but when I change the grep line to `grep -e " $TMP "` or to `grep -e
>\" $TMP \"` I get nothing..
Try the -w (grep for word) option.
Also you could reduce the pipeline to:
grep -w $TMP < /tmp/modemlist$$.tmp 2>/dev/null | tail -1
--
SLUG - Sydney Linux User Group Mailing List - http://slug.org.au/
More Info: http://slug.org.au/lists/listinfo/slug