Salvatore Iovene wrote: > On Fri, Mar 02, 2007 at 03:07:37PM +0530, Bhasker C V wrote: > >> [EMAIL PROTECTED] ~]$ who | grep `logname` >> logname: no login name >> Usage: grep [OPTION]... PATTERN [FILE]... >> Try `grep --help' for more information. >> > > Weird. Consiedering that this works: > > who | grep `whoami` > > Where's the catch? > > I'm running SuSE, and can reproduce the problem here. Seems logname does something weird when stdin is not your tty. Check this out:
[EMAIL PROTECTED]:0$ logname</dev/null logname: no login name My manual-page has nothing to say. Try looking at the source if you must. -- Håkon Alstadheim spamtrap: [EMAIL PROTECTED] -- 1 hit & you are out -- To UNSUBSCRIBE, email to [EMAIL PROTECTED] with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]