The UNIX and Linux Forums  


Go Back   The UNIX and Linux Forums > Top Forums > UNIX for Advanced & Expert Users
.
google unix.com




View Single Post in the UNIX and Linux Forums - Click on the Thread or Permalink to View Entire Thread -->
  #5 (permalink)  
Old 07-17-2008
phemanth24 phemanth24 is offline
Registered User
  
 

Join Date: Apr 2008
Location: Hyderabad, India
Posts: 14
BTW, you could also bypass putting this into a script.


Code:
awk '/(^A)|(^B)/ {num++} END {if(num > 0);printf("%d instances of A,B exist\n", num);}' column

'column' is the file where I have the format you specified.