
Mailing List Archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[tlug] GREP basics
- Date: Thu, 30 Jan 2003 23:45:46 +0900 (JST)
- From: Charles Muller <acmuller@example.com>
- Subject: [tlug] GREP basics
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>" *
Then I get a list of each of the lines containing this occurrence, but again, no
total number at the end.
I have looked at all of the options listed in _man grep_, but I don't see
anything for listing just the total number of hits at the end. I would
think that this must be a rather elementary GREP function, but I don't see
any explanation for it. Can anyone give me a clue?
Thanks,
Chuck
---------------------------
Charles Muller <acmuller@example.com>
Faculty of Humanities, Toyo Gakuen University
Digital Dictionary of Buddhism and CJKV-English Dictionary [http://www.acmuller.net]
H-Buddhism List Editor [http://www2.h-net.msu.edu/~buddhism/]
Mobile Phone: 090-9310-1787
Home |
Main Index |
Thread Index