GNU bug report logs - #68592
Grep 3.1 does not recognize regex beginning-of-line and end-of-line anchors (^ and $). on RHEL 8.9

Previous Next

Package: grep;

Reported by: Erich Wolz <wolz <at> us.ibm.com>

Date: Fri, 19 Jan 2024 21:15:01 UTC

Severity: normal

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

Bug is archived. No further changes may be made.

Full log


View this message in rfc822 format

From: Sam James <sam <at> gentoo.org>
To: Erich Wolz <wolz <at> us.ibm.com>
Cc: 68592 <at> debbugs.gnu.org
Subject: bug#68592: Grep 3.1 does not recognize regex beginning-of-line and end-of-line anchors (^ and $). on RHEL 8.9
Date: Sat, 20 Jan 2024 01:22:19 +0000
Erich Wolz <wolz <at> us.ibm.com> writes:

> Steps to reproduce:
> 1) create a file containing the following lines:
>    foo bar baz
>    bar foo baz
>    baz foo bar
>    bar baz foo
>    foo baz bar
>    baz bar foo
> 2) The command "grep '.*bar$' filename1"  should find the two lines ending in "bar" but it does not.
> 3) create a file containing the following lines:
>    foo
>    foo bar
>    baz foo
>    foo bar baz
>    baz bar foo
> 4) The command "grep '^foo$' filename2" should find only the first line but it does not.
>

If you cannot reproduce this with the latest release of GNU grep (3.11),
please report it to RHEL instead. 

It works OK for me with 3.11.




This bug report was last modified 1 year and 118 days ago.

Previous Next


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