![]() |
Hello and Welcome from United States to the UNIX and Linux Forums! Thank You for Visiting and Joining Our Global Community.
|
|
google unix.com
|
|||||||
| Forums | Register | Forum Rules | Links | Albums | FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read |
| UNIX for Dummies Questions & Answers If you're not sure where to post a UNIX or Linux question, post it here. All UNIX and Linux newbies welcome !! |
More UNIX and Linux Forum Topics You Might Find Helpful
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Counting occurence of a particular character on each line | hey_mak | UNIX for Dummies Questions & Answers | 4 | 06-26-2008 05:56 AM |
| counting the occurence of particular characters | Audra | UNIX for Dummies Questions & Answers | 2 | 03-28-2008 10:01 AM |
| search& count for the occurence of a word | skoppana | UNIX for Dummies Questions & Answers | 1 | 11-09-2007 05:07 PM |
| Delete all occurence of a word in one shot | namishtiwari | Shell Programming and Scripting | 6 | 08-24-2007 08:41 AM |
| Counting occurence of a coma | dbrundrett | Shell Programming and Scripting | 3 | 01-22-2004 05:40 PM |
![]() |
|
|
LinkBack | Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
|||||
|
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 Here is something that works: Code:
$ tr "\011\040" "\012\012"<foo1 | grep -ic "^apache$" Last edited by TonyFullerMalv; 06-30-2009 at 04:04 PM.. Reason: Workinh version! |
|
|||||
|
Quote:
Code:
grep "^apache$" |
| Sponsored Links | ||
|
|