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 the UNIX and Linux Forums - Click on the Thread or Permalink to View Entire Thread -->
  #4 (permalink)  
Old 02-19-2008
jim mcnamara jim mcnamara is online now Forum Staff  
...@...
  
 

Join Date: Feb 2004
Location: NM
Posts: 5,790

Code:
head -1 table > workingfile
awk 'NR>1' table | sort -k1.1,1.10 -k2.1,2.10 -k 23.1,3.10  | \
    awk '!arr[$2 $3]++' >> workingfile

remove duplicates on col2 and col 3.