GNU bug report logs - #35159
Bug in grep -e (GNU grep 2.51)

Previous Next

Package: grep;

Reported by: Andrew Browne <andrew.p.browne-nr <at> raytheon.com>

Date: Fri, 5 Apr 2019 14:31:02 UTC

Severity: normal

Done: Paul Eggert <eggert <at> cs.ucla.edu>

Bug is archived. No further changes may be made.

To add a comment to this bug, you must first unarchive it, by sending
a message to control AT debbugs.gnu.org, with unarchive 35159 in the body.
You can then email your comments to 35159 AT debbugs.gnu.org in the normal way.

Toggle the display of automated, internal messages from the tracker.

View this report as an mbox folder, status mbox, maintainer mbox


Report forwarded to bug-grep <at> gnu.org:
bug#35159; Package grep. (Fri, 05 Apr 2019 14:31:02 GMT) Full text and rfc822 format available.

Acknowledgement sent to Andrew Browne <andrew.p.browne-nr <at> raytheon.com>:
New bug report received and forwarded. Copy sent to bug-grep <at> gnu.org. (Fri, 05 Apr 2019 14:31:02 GMT) Full text and rfc822 format available.

Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):

From: Andrew Browne <andrew.p.browne-nr <at> raytheon.com>
To: "bug-grep <at> gnu.org" <bug-grep <at> gnu.org>
Subject: Bug in grep -e (GNU grep 2.51)
Date: Fri, 5 Apr 2019 13:18:08 +0000
[Message part 1 (text/plain, inline)]
Hi,

I am using GNU grep 2.5.1, so maybe this has been fixed by now.

Bug: 'grep -e <pattern1> -e <pattern2> <file>' sometimes doesn't show all of the matches for one pattern.
Example: 'grep -e blah -e stuff <file>' finds all "blah", but only some of "stuff", when <file> contains lots of "blah" and only a few "stuff" mixed in.

As an alternative that works, I used 'grep -E '<pattern1>|<patter2>' <file>'


Andrew Browne
[Message part 2 (text/html, inline)]

Information forwarded to bug-grep <at> gnu.org:
bug#35159; Package grep. (Mon, 08 Apr 2019 05:26:02 GMT) Full text and rfc822 format available.

Message #8 received at 35159 <at> debbugs.gnu.org (full text, mbox):

From: Paul Eggert <eggert <at> cs.ucla.edu>
To: Andrew Browne <andrew.p.browne-nr <at> raytheon.com>
Cc: 35159 <at> debbugs.gnu.org
Subject: Re: bug#35159: Bug in grep -e (GNU grep 2.51)
Date: Sun, 7 Apr 2019 22:25:32 -0700
Can you give a specific test case illustrating the bug?




Reply sent to Paul Eggert <eggert <at> cs.ucla.edu>:
You have taken responsibility. (Tue, 09 Apr 2019 18:54:01 GMT) Full text and rfc822 format available.

Notification sent to Andrew Browne <andrew.p.browne-nr <at> raytheon.com>:
bug acknowledged by developer. (Tue, 09 Apr 2019 18:54:02 GMT) Full text and rfc822 format available.

Message #13 received at 35159-done <at> debbugs.gnu.org (full text, mbox):

From: Paul Eggert <eggert <at> cs.ucla.edu>
To: Andrew Browne <andrew.p.browne-nr <at> raytheon.com>
Cc: 35159-done <at> debbugs.gnu.org
Subject: Re: bug#35159: Bug in grep -e (GNU grep 2.51)
Date: Tue, 9 Apr 2019 11:53:29 -0700
On 4/8/19 6:03 AM, Andrew Browne wrote:
> * dummyfile1.txt contains "blah blah blah one two three blah blah blah one two three blah blah blah"
> * dummyfile2.txt contains "blah blah blah one two three blah blah blah one two three"
> * 'grep --color -i -e blah -e two dummyfile1.txt' produces the file with all colored "blah" and none of the "two" are colored.
> * 'grep --color -i -e blah -e two dummyfile2.txt' produces the file with all colored "blah" and only the second "two" is colored. (It seems to like finding <pattern2> on a line only after all of <pattern1> are found on that line.)

I don't observe these symptoms in grep 3.3, the current version. So I
think the bug has been fixed, and am closing the bug report. Thanks
anyway for reporting it. grep 2.5.1 was released in 2004, and it's time
to upgrade for other reasons.





bug archived. Request was from Debbugs Internal Request <help-debbugs <at> gnu.org> to internal_control <at> debbugs.gnu.org. (Wed, 08 May 2019 11:24:05 GMT) Full text and rfc822 format available.

This bug report was last modified 4 years and 355 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.