Finding the user name via the shell

William E. Davidsen Jr davidsen at steinmetz.ge.com
Sat Dec 3 07:50:21 AEST 1988


In article <6323 at polyslo.CalPoly.EDU> mdella at polyslo.CalPoly.EDU (Marcos R. Della) writes:
| I was wondering if anyone out there knew how to determine the users
| login name while running a shell script. I can get the home address
| $HOME, but not the name. This is under sco xenix 2.2.3 I think...

There is a logname command which has been around since 2.1.2 at least. I
believe the name is read from wtmp or some such.
-- 
	bill davidsen		(wedu at ge-crd.arpa)
  {uunet | philabs}!steinmetz!crdos1!davidsen
"Stupidity, like virtue, is its own reward" -me



More information about the Comp.unix.xenix mailing list