![]() |
|
|
|
|
|||||||
| UNIX for Advanced & Expert Users Advanced UNIX and Linux questions go here. Expert-to-Expert. |
|
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| problem with grep on search string in a txt file over multiple files | m00 | UNIX for Dummies Questions & Answers | 2 | 05-18-2008 11:21 AM |
| trying to count lines in multiple files | llsmr777 | UNIX for Dummies Questions & Answers | 1 | 01-23-2008 09:52 AM |
| grep running total/ final total across multiple files | MrAd | UNIX for Dummies Questions & Answers | 5 | 05-08-2007 10:03 AM |
| Grep, count and match two files | madhunk | Shell Programming and Scripting | 19 | 05-31-2006 11:52 AM |
| grep multiple text files in folder into 1 text file? | coppertone | UNIX for Dummies Questions & Answers | 7 | 08-23-2002 11:50 AM |
|
|
Submit Tools | LinkBack | Thread Tools | Display Modes |
|
|||
|
grep count across multiple files
I have a number of simulation log files and I want to get a total count of the "PASSED" expression in them. If I use grep -c <files>, grep would give a tally for each file. I just want one number, the total count. How do I do that?
|
| Forum Sponsor | ||
|
|
|
|||
|
That counts the number of files with PASSED in them, I was under the impression that the number of lines was the interesting number (there could be more than one per file).
Second drl's suggestion; Code:
cat files | grep -c PASSED |
|||
| Google UNIX.COM |
| Thread Tools | |
| Display Modes | |
|
|