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 07-04-2009
scottn scottn is online now Forum Advisor  
VIP Member
  
 

Join Date: Jun 2009
Location: Zürich, CH
Posts: 1,119
Because you said

Quote:
...it may have more columns
A slight modification to vidyadhar85's code

Code:
sort -t";" -k3 -k2 filename|awk -F\; '{A[$NF]=A[$NF]"\n"$0}END{for (i in A) {print toupper(i)A[i]}}'