The UNIX and Linux Forums
>
Top Forums
>
UNIX for Dummies Questions & Answers
counting the occurence of a word
.
User Name
Remember Me?
Password
google unix.com
Forums
Register
Forum Rules
Links
Albums
FAQ
Members List
Calendar
Search
Today's Posts
Mark Forums Read
Thread
:
counting the occurence of a word
View Single Post in the UNIX and Linux Forums - Click on the Thread or Permalink to View Entire Thread -->
#
1
(
permalink
)
06-30-2009
pranabrana
Registered User
Join Date: Jun 2008
Location: Bangalore
Posts: 19
counting the occurence of a word
In a file I have to count a particular word. like i need apache how many times.
I tried this
$ tr "\011" "\012\012"<foo1 | tr -cd "[a-zA-z\012]" |sort\uniq -c
but I got result like this
32 apache
18
dns
12 doctor
Please sugest me
pranabrana
View Public Profile
Find all posts by pranabrana
Find pranabrana's past nominations received
Find pranabrana's present nominations given