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. Interestingly, grep does not read the entire input if the -c or -C0 options are added in addition to -m, and also when using -l or -q instead of -m. I believe this is caused by commit 5122195.
- bug#17640: grep with -m reads the entire input Marc Aldorasi
- bug#17640: grep with -m reads the entire input Jim Meyering
- bug#17640: grep with -m reads the entire input Jim Meyering
- bug#17640: grep with -m reads the entire input Jim Meyering
- bug#17640: grep with -m reads the entire in... Jim Meyering
