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 -->
  #6 (permalink)  
Old 04-28-2008
radoulov's Avatar
radoulov radoulov is offline Forum Staff  
addict
  
 

Join Date: Jan 2007
Location: Варна, България / Milano, Italia
Posts: 2,926
Like this?


Code:
awk '!_[$2]++{
printf "data_2_%d = new Option(\"%s\",\"%s\");\n", ++c, $2, $2
}' file


Last edited by radoulov; 04-28-2008 at 12:20 PM.. Reason: corrected