Mailing List Archive


[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [tlug] GREP basics



On Thu, Jan 30, 2003 at 11:45:46PM +0900, Charles Muller wrote:
> I have a directory that contains 82 files. I want to get a count of the
> number of occurrences of the word "<hdwd>" in all 82 files.
> 
> But if I do:
> 
> [chuck@example.com ddbxml]$ grep -c "<hdwd>" * 
> 
> I get a list of the 82 files, with the number of hits in each listed next to
> them, but not the grand total.
> 
> If I do:
> 
> [chuck@example.com ddbxml]$ grep "<hdwd>" * 
> 

grep "<hdwd>" * | wc -l

--Matt


Home | Main Index | Thread Index

Home Page Mailing List Linux and Japan TLUG Members Links