Path: utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!oakhill!root From: root@oakhill.sps.mot.com (Operator) Newsgroups: comp.unix.shell Subject: Retrieving unique user numbers Message-ID: <1991Apr25.153217.9572@oakhill.sps.mot.com> Date: 25 Apr 91 15:32:17 GMT Distribution: comp.unix.shell Organization: Motorola Inc., Austin, Texas Lines: 24 Hello all -- I was asked by a user how to retrieve/identify the unique user number from within the shell environment (ksh). What he is looking for would, preferably, function in much the same fashion as the command [echo `/usr/bin/logname`], where the result of this op could then be piped into a subsequent operation. If I properly understand his request, what he is trying to avoid is invoking an awk script to execute a search of the /etc/passwd file; however, if an embedded shell command is not available to fulfill this purpose, then awk it is. Many thanks, Vance -- "I like this company - they hired me, for one; besides that, they haven't asked me to speak for them - so I won't." /************************************************************** * Vance R. Fields III | Motorola SPS *