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 UNIX Forums - Click on the Thread or Permalink to View Entire Thread -->
  #7 (permalink)  
Old 03-27-2008
sbasetty sbasetty is offline
Registered User
 

Join Date: Sep 2006
Posts: 75
I worked great

awk 'BEGIN { n = 100} { if ($1!= prev) { n++ } prev = $1; print $1,$2,n }'

Thanks a lot
Reply With Quote