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 -->
  #2 (permalink)  
Old 05-23-2006
jim mcnamara jim mcnamara is offline Forum Staff  
...@...
  
 

Join Date: Feb 2004
Location: NM
Posts: 5,808
I'm not sure what the
Quote:
abc-xyz
abc = 0-999
xyz = 0-999
has to do with anything. but for your column of numbers try:

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