With grep 2.18, the -m option would cause grep to stop reading input
after printing the requested number of matching lines.  With version
2.19, grep reads the entire input before exiting.

Can you give an example of the failure? What platform are you running on? I couldn't reproduce the problem on Fedora 20 x86-64. Here's how I tried:

$ seq 1000000 >million
$ (grep -m1000 0 | wc -l; wc -l) <million
1000
995994

and these numbers look correct to me.



Reply via email to