![]() |
Hello and Welcome from United States to the UNIX and Linux Forums! Thank You for Visiting and Joining Our Global Community.
|
|
google unix.com
|
|||||||
| Forums | Register | Forum Rules | Links | Albums | FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read |
| UNIX for Advanced & Expert Users Expert-to-Expert. Learn advanced UNIX, UNIX commands, Linux, Operating Systems, System Administration, Programming, Shell, Shell Scripts, Solaris, Linux, HP-UX, AIX, OS X, BSD. |
More UNIX and Linux Forum Topics You Might Find Helpful
|
||||
| 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 02:21 PM |
| trying to count lines in multiple files | llsmr777 | UNIX for Dummies Questions & Answers | 1 | 01-23-2008 01:52 PM |
| grep running total/ final total across multiple files | MrAd | UNIX for Dummies Questions & Answers | 5 | 05-08-2007 01:03 PM |
| Grep, count and match two files | madhunk | Shell Programming and Scripting | 19 | 05-31-2006 02:52 PM |
| grep multiple text files in folder into 1 text file? | coppertone | UNIX for Dummies Questions & Answers | 7 | 08-23-2002 02:50 PM |
![]() |
|
|
LinkBack | Thread Tools | Search this Thread | Rate Thread | 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?
|
|
||||
|
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 |
![]() |
| Bookmarks |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|