I'm learning UNIX and I have a simple question

Jim Webb jrw at mtune.att.com
Sat Jun 22 00:41:13 AEST 1991


In article <16470 at smoke.brl.mil> gwyn at smoke.brl.mil (Doug Gwyn) writes:
>In article <jpope.677361841 at sysp1> jpope at hq.af.mil (i991x) writes:
>>In the UNIX that I use there is a command "who" which lists the users that
>>are currently on the system (as well as which terminal, when they logged on,
>>etc..).  The problem is that they are listed one user per line.
>>I would like to strip off the first field (the id-name) and output to the
>>screen four columns (four users per line instead of one) without the other
>>information about where and when they logged in.
>
>	who | awk '{print $1}' | sort -u | 4
>
>where "4" is one of several links ("2" through "6") to the same
>executable shell script that I maintain in one of the command directories:
>
>	exec pr -t -w80 -`basename $0` $*

In the SVR3.2 and similiar universes, you can also say 'who -q -n4'

Jim



More information about the Comp.unix.questions mailing list