bug#33574: grep -c question

2018-12-02 Thread Paul Jackson
>> `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 "

bug#33574: grep -c question

2018-12-02 Thread Phillip Feldman
`grep -c` reports the number of matching lines--not the total number of times the pattern appears. On Sat, Dec 1, 2018 at 11:15 PM Helen Grubner wrote: > Dear Team > > > > Can you tell me, why I see this with grep -c on a file with following > content? > > > > $ cat file_13.txt > > 1 > > 2 > > 3

bug#33574: grep -c question

2018-12-01 Thread Helen Grubner
Dear Team Can you tell me, why I see this with grep -c on a file with following content? $ cat file_13.txt 1 2 3 4 5 6 7 8 9 10 11 12 13 $ grep -c 1 file_13.txt 5 Should it not show 6? When search for value 2, it is correct. $ grep -c 3 file_13.txt 2 $ file