sean finney wrote:

i invite someone to invent a better way, i'd like to hear it :)


Rather than invoke awk twice, just use awk for everything (-: (I used $DISPLAY for testing)

w | awk "\$3 ~ /$DISPLAY/ {print \$1; exit 0}"

Note the escaped '$'s.


-- To UNSUBSCRIBE, email to [EMAIL PROTECTED] with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]



Reply via email to