Beefy Boxes and Bandwidth Generously Provided by pair Networks
No such thing as a small change
 
PerlMonks  

Re: Re: Count word in my dir

by Cine (Friar)
on Aug 01, 2003 at 00:46 UTC ( [id://279828]=note: print w/replies, xml ) Need Help??


in reply to Re: Count word in my dir
in thread Count word in my dir

This wont work, if the word appears two times in a single line...
A more robust solution would be
grep -h -i WORDHERE * | perl -le 'while(<>){$i+=s/\bWORDHERE\b//ig} pr +int $i'


T I M T O W T D I

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://279828]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others admiring the Monastery: (7)
As of 2024-03-28 09:50 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found