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

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

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

//Jadu