The UNIX and Linux Forums  

Go Back   The UNIX and Linux Forums > Top Forums > Shell Programming and Scripting
.
google unix.com




View Single Post in the UNIX and Linux Forums - Click on the Thread or Permalink to View Entire Thread -->
  #1 (permalink)  
Old 10-24-2008
lochraven lochraven is offline
Registered User
  
 

Join Date: Aug 2008
Posts: 29
who - uniq output

Hi,
I'd like to have a script what takes the 'who' output and grabs the user names and outputs just the user name, and no duplicates.

I know I could do something like:

who | awk '{print $1}' | uniq -u

but I'd like to stay away from using the 'uniq' comand and just use awk.

Thanks