whoami?
John C. Archambeau
jca at pnet01.cts.com
Wed Dec 26 16:16:08 AEST 1990
paulz at sco.COM (W. Paul Zola) writes:
>
>In article <6066 at crash.cts.com> jca at pnet01.cts.com (John C. Archambeau) writes:
>}Is there a version of the who command for Xenix that will give you your
>}effective user id when presented with who am i?
>}
>[deleted]
>
>I suggest you look at the id(C) command. It might just do what you want.
>
>
> lanshark at p2 [~]
> [1]: id
> uid=666(paulz) gid=115(support)
>
> lanshark at p2 [~]
> [2]: su root
> Password:
> # id
> uid=0(root) gid=1(other)
> # exit
>
> lanshark at p2 [~]
> [3]:
>
>Hope this helps.
>
>-
>Paul Zola Software Support Engineer
> paulz at sco.COM
>We only know in theory what we are doing. - Kate Bush
> DISCLAIMER: I speak for myself, and not for SCO.
What I want is something similiar to the BSD/SunOS whoami. For example, in a
.cshrc file, I want to be able to do this:
if (`whoami` == "root") then
set prompt = "#"
else
set prompt = "%"
endif
Something like that. Somebody gave me a code fragment in e-mail that does
return what I want, but shell scripts bomb. Any idea why?
// JCA
/*
**--------------------------------------------------------------------------*
** Flames : /dev/null | What to buy?
** ARPANET : crash!pnet01!jca at nosc.mil | EISA or MCA?
** INTERNET: jca at pnet01.cts.com | When will the bus wars end?
** UUCP : {nosc ucsd hplabs!hp-sdd}!crash!pnet01!jca
**--------------------------------------------------------------------------*
*/
More information about the Comp.unix.xenix.sco
mailing list