grep: sometimes mistakenly matches lines when last of multiple patterns includes backref
Bug #2007155 reported by
Santiago Ruano Rincon
This bug affects 1 person
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
grep (Ubuntu) |
New
|
Undecided
|
Unassigned |
Bug Description
This bug was introduced upstream with grep 3.4. Originally reported in Debian: https:/
On an ubuntu focal machine:
echo 'Total failed: 2 (1 ignored)' | grep -e '^Total failed: 0$' -e '^Total failed: \([0-9]*\) (\1 ignored)$'
Total failed: 2 (1 ignored)
A fixed grep doesn't match the line.
This has been fixed in debian unstable with 3.8-4, and in bullseye with 3.6-1+deb11u1.
I've tested the attached patch in ubuntu focal (grep 3.4)
To post a comment you must log in.
The attachment "1029235- grep-bug- backref- in-last- of-multiple- patterns. patch" seems to be a patch. If it isn't, please remove the "patch" flag from the attachment, remove the "patch" tag, and if you are a member of the ~ubuntu-reviewers, unsubscribe the team.
[This is an automated message performed by a Launchpad user owned by ~brian-murray, for any issues please contact him.]