> > 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.
On 02.03.07 11:27, H?kon Alstadheim wrote: > 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. I'd say that logname detects logged user by checking terminal of stdin file handle... However, that's logname feature, use whoami or different utility -- Matus UHLAR - fantomas, [EMAIL PROTECTED] ; http://www.fantomas.sk/ Warning: I wish NOT to receive e-mail advertising to this address. Varovanie: na tuto adresu chcem NEDOSTAVAT akukolvek reklamnu postu. (R)etry, (A)bort, (C)ancer -- To UNSUBSCRIBE, email to [EMAIL PROTECTED] with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]