>> `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
                p...@usa.net



Reply via email to