Finding the user name via the shell

Tim Evans tkevans at fallst.UUCP
Fri Dec 9 22:13:39 AEST 1988


In article <1794 at netmbx.UUCP>, felix at netmbx.UUCP (Felix Gaehtgens) writes:
> 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
> 
> how about:
> 
> set name=`who am i | cut -f1 -d" "`

This may not work on SCO Xenix either, unless you have the "text" package.
The 'cut' (and companion 'paste') utilities are not part of the SCO
"runtime" package.  (Public domain versions are available around the net,
and they run on my SCO Xenix 386, Version 2.2.3).  You can use 'awk' to
massage the output of 'who am i'.

-- 
UUCP:  ...!{rutgers|ames|uunet}!mimsy!aplcen!wb3ffv!fallst!tkevans
INTERNET:  tkevans%fallst at wb3ffv.ampr.org
OTHER: ...!attmail!fallst!tkevans
Tim Evans  2201 Brookhaven Court, Fallston, MD  21047   (301) 965-3286



More information about the Comp.unix.xenix mailing list