|
From: | Paul Eggert |
Subject: | bug#17640: grep with -m reads the entire input |
Date: | Fri, 30 May 2014 00:08:09 -0700 |
User-agent: | Mozilla/5.0 (X11; Linux x86_64; rv:24.0) Gecko/20100101 Thunderbird/24.5.0 |
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.
[Prev in Thread] | Current Thread | [Next in Thread] |