Path: utzoo!utgpu!watmath!clyde!bellcore!rutgers!mailrus!ames!haven!aplcen!wb3ffv!fallst!tkevans From: tkevans@fallst.UUCP (Tim Evans) Newsgroups: comp.unix.xenix Subject: Re: Finding the user name via the shell Summary: This may not do either Keywords: shell variables Message-ID: <489@fallst.UUCP> Date: 9 Dec 88 12:13:39 GMT References: <6323@polyslo.CalPoly.EDU> <1794@netmbx.UUCP> Organization: Tim Evans, Fallston, MD Lines: 20 In article <1794@netmbx.UUCP>, felix@netmbx.UUCP (Felix Gaehtgens) writes: > In article <6323@polyslo.CalPoly.EDU> mdella@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@wb3ffv.ampr.org OTHER: ...!attmail!fallst!tkevans Tim Evans 2201 Brookhaven Court, Fallston, MD 21047 (301) 965-3286