If all you want is the count for apache then you could do:
Code:
$ tr "\011" "\012\012"<foo1 | tr -cd "[a-zA-z\012]" | grep "^apache$" | wc -l
Update I had assumed the tr bits were working but they aren't...
Here is something that works:
Code:
$ tr "\011\040" "\012\012"<foo1 | grep -ic "^apache$"
Last edited by TonyFullerMalv; 06-30-2009 at 05:04 PM..
Reason: Workinh version!
|