Bug 24924 - grep does not match [^]] OK due to RedHat patch
Summary: grep does not match [^]] OK due to RedHat patch
Status: CLOSED RAWHIDE
Alias: None
Product: Red Hat Linux
Classification: Retired
Component: grep (Show other bugs)
(Show other bugs)
Version: 7.1
Hardware: All Linux
high
high
Target Milestone: ---
Assignee: Bernhard Rosenkraenzer
QA Contact: Aaron Brown
URL:
Whiteboard:
Keywords:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2001-01-25 12:29 UTC by Remco Wouts
Modified: 2005-10-31 22:00 UTC (History)
1 user (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2001-02-09 15:08:04 UTC
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)

Description Remco Wouts 2001-01-25 12:29:50 UTC
The following does work correctly in GNU grep 2.4.2:
$ echo -e "]name\n name" | grep '[^]]name'
It matches ' name' and does not match ']name' as it should.

However the RedHat patched version of GNU grep 2.4.2 matches /both/ ']name' 
and ' name'. This is not good especially since this construct is used a lot
in scripts 
like so:
$ ps ax | grep '[^]]progname'
To filter out all instances of progname except the grep invocation.

Comment 1 Karsten Hopp 2001-02-09 15:08:00 UTC
still doesn't work

Comment 2 Bernhard Rosenkraenzer 2001-05-13 14:21:38 UTC
Fixed in 2.5e-2


Comment 3 Vlado Potisk 2001-08-24 19:49:50 UTC
Upgraded to 2.5e-2 to fix this one but it introduces a new bug
in grep causing ./configure scripts (autoconf) to give wrong
results ! Here is the proof: this line shows no match,
and that's incorrect
  echo "mode_t;" | grep "mode_t[^a-zA-Z_0-9]"
 
I checked Rawhide today and the 2.5-e2 version is no longer there,
there is 2.4.2-7 instead which appears not to have any of these bugs.


Note You need to log in before you can comment on or make changes to this bug.