The UNIX and Linux Forums  

Go Back   The UNIX and Linux Forums > Top Forums > UNIX for Dummies Questions & Answers
Google UNIX.COM



View Single Post in UNIX Forums - Click on the Thread or Permalink to View Entire Thread -->
  #5 (permalink)  
Old 05-14-2008
shamrock shamrock is offline
Registered User
 

Join Date: Oct 2007
Location: USA
Posts: 541
Code:
var2=$(users | awk '{for(i=1; i<=NF; ++i) if(!a[$i]++) printf("%s ", $i)}')
Reply With Quote