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 the UNIX and Linux Forums - Click on the Thread or Permalink to View Entire Thread -->
  #6 (permalink)  
Old 05-22-2008
kartikkumar84@g kartikkumar84@g is offline
Registered User
  
 

Join Date: May 2008
Posts: 17
Quote:
var2=$(users | awk '{for(i=1; i<=NF; ++i) if(!a[$i]++) printf("%s ", $i)}')
Hi, Thank you, this works, is it possible to it without using sed or awk.