LOGNAME, USER variables under Xenix
Marc Unangst
mju at mudos.ann-arbor.mi.us
Tue Apr 30 10:53:17 AEST 1991
bill at bilver.uucp (Bill Vermillion) writes:
> Xenix does have a whoami command, except is typed who am i three
> words.
Bzzt. "who am i" (and the variant, "who am I") is not the same as
"whoami", as about 10 seconds of work with a BSD system will tell
you. "who am i" basically does a "who" and then greps out the line
with your tty name in it. "whoami" gives the login id that
corresponds to the current UID.
One important diffence is that "who am i" always returns the name in
/etc/utmp, but "whoami" looks at the current UID and generates the
name from that. This means that "whoami" works as expected when
you're su(1)ed to another user, while "who am i" does not.
--
Marc Unangst |
mju at mudos.ann-arbor.mi.us | "Bus error: passengers dumped"
...!hela!mudos!mju |
More information about the Comp.unix.xenix.sco
mailing list