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 UNIX Forums - Click on the Thread or Permalink to View Entire Thread -->
  #7 (permalink)  
Old 05-19-2008
timj123 timj123 is offline
Registered User
 

Join Date: Jan 2008
Posts: 61
awkologist,
I figured out number 2 by changing the END statement from:
Code:
END {
for ( i in x )
printf "%-3s%-4s\n%-8s\n%-7s\n","UFC ",i,"--------",x[i]
}
to:

Code:
END {
for ( i in x )
if ( i != "0-0" ) {
printf "\n%-3s%-4s\n%-8s\n%-7s\n","UFC ",i,"--------",x[i] }
}

I know I should have figured out sooner, but getting burnt out on this. If anyone has a quick down & dirty way to sort the arrays that would be great, I am pretty sure it can be done with for loops, but there might be a easier way.

Thanks
Reply With Quote