The UNIX and Linux Forums  
Hello and Welcome from United States to the UNIX and Linux Forums! Thank You for Visiting and Joining Our Global Community.

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 -->
  #3 (permalink)  
Old 10-14-2008
Pablo_beezo Pablo_beezo is offline
Registered User
  
 

Join Date: Apr 2008
Posts: 85
Question

Do not use awk at all so not sure how to write this??

I need two variables that will output the 8 -9 byte total and 10 byte total i.e.

8-9=awk '{ arr[length($1)]++ }
END {print "8 - 9 bytes", arr[8]+arr[9] } ' path for file?
10=awk '{ arr[length($2)]++; }
END {print " 10 bytes ", arr[10] } ' path for file?


Is this how you would use the solution by Jim???