Subject: bug#33574: grep -c question

From: Paul Jackson <[email-masked]>
Date: Sun, 02 Dec 2018 08:55:49 -0600

>> `grep -c` reports the number of matching lines--not the total number of
>> times the pattern appears.

Yes. 

In other words, the line "11" counts as 1 match (one line), not as two matches.

I  would expect the command "grep -c somepattern somefile" to provide the
same results as the command "grep somepattern somefile | wc -l" (each matching
line counts once.)

-- 
                Paul Jackson
                [email-masked]