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-23-2006
reborg's Avatar
reborg reborg is offline
Administrator
 
Join Date: Mar 2005
Location: Ireland
Posts: 3,513
There were just a couple of typos in Jim's solution, here is what he intended to post.

Code:
awk '
      {arr[$0]++}
      END { for(i in arr) 
              { print i, arr[i] }
      } '  filename > newfilename
Reply With Quote