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 -->
  #3 (permalink)  
Old 05-27-2008
jaduks's Avatar
jaduks jaduks is offline
Registered User
  
 

Join Date: Aug 2007
Location: Assam,India
Posts: 167
And,


Code:
$ awk '$2=="Hello" {count["Number of "$2" for "substr($1,1,5)]++}END{for(j in count) print j"(time):",count[j]}' gobi1.txt
Number of Hello for 10:23(time): 3

//Jadu