; 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
; 

You can eliminate all forking by learning some sed, although admittedly this
is slighly less readable to novices than the grep -w|tail solution.
(that stdin redir is redundant btw).

        sed '/ '$a' /!d;h;${g;p;};d' /tmp/modemlist.$$.tmp

r.


--
SLUG - Sydney Linux User Group Mailing List - http://slug.org.au/
More Info: http://slug.org.au/lists/listinfo/slug

Reply via email to