Path: utzoo!utgpu!news-server.csri.toronto.edu!rpi!zaphod.mps.ohio-state.edu!pacific.mps.ohio-state.edu!linac!att!att!dptg!mtune!jrw From: jrw@mtune.att.com (Jim Webb) Newsgroups: comp.unix.questions Subject: Re: I'm learning UNIX and I have a simple question Message-ID: <1991Jun21.144113.22326@mtune.att.com> Date: 21 Jun 91 14:41:13 GMT References: <16470@smoke.brl.mil> Organization: AT&T BL Middletown/Lincroft NJ USA Lines: 19 In article <16470@smoke.brl.mil> gwyn@smoke.brl.mil (Doug Gwyn) writes: >In article jpope@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