Path: utzoo!mnetor!tmsoft!torsqnt!news-server.csri.toronto.edu!clyde.concordia.ca!thunder.mcrcim.mcgill.edu!snorkelwacker.mit.edu!usc!sdd.hp.com!ucsd!nosc!crash!pnet01!jca From: jca@pnet01.cts.com (John C. Archambeau) Newsgroups: comp.unix.xenix.sco Subject: Re: whoami? Message-ID: <6537@crash.cts.com> Date: 26 Dec 90 05:16:08 GMT Sender: root@crash.cts.com Organization: People-Net [pnet01], El Cajon CA Lines: 57 paulz@sco.COM (W. Paul Zola) writes: > >In article <6066@crash.cts.com> jca@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@p2 [~] > [1]: id > uid=666(paulz) gid=115(support) > > lanshark@p2 [~] > [2]: su root > Password: > # id > uid=0(root) gid=1(other) > # exit > > lanshark@p2 [~] > [3]: > >Hope this helps. > >- >Paul Zola Software Support Engineer > paulz@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@nosc.mil | EISA or MCA? ** INTERNET: jca@pnet01.cts.com | When will the bus wars end? ** UUCP : {nosc ucsd hplabs!hp-sdd}!crash!pnet01!jca **--------------------------------------------------------------------------* */