Bug 118084

Summary: grep fails for uppercase expr. and -i and (-o or --color)
Product: [Retired] Red Hat Linux Reporter: Thomas Steudten <tomri>
Component: grepAssignee: Tim Waugh <twaugh>
Status: CLOSED CURRENTRELEASE QA Contact:
Severity: medium Docs Contact:
Priority: medium    
Version: 9   
Target Milestone: ---   
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2004-03-12 09:32:44 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Attachments:
Description Flags
patch to fix -oi uppercase regex. on RH9 none

Description Thomas Steudten 2004-03-11 20:17:43 UTC
Description of problem:
In Context of Bug 72641 with given patch from there for -o and -i
problem.
grep-2.5.1-7 has patch grep-2.5.1-oi.patch included.
Maybe the problem is in context to a bug in glibc (glibc-2.3.2-11.9).

grep with -i and uppercase expr. and -o and/or --color gives wrong/ no
output.
With -F or -P it works fine. grep -i without -o --color works fine for
all options of -G,F,E,P.




Version-Release number of selected component (if applicable):
grep-2.5.1-7

How reproducible:
Always

Steps to Reproduce:
1. echo "one tEst here" | grep -oi TEST
2. echo "one tEst here" | grep -i --color=auto TEST
3. echo "one tEst here" | grep -Fi --color=auto TEST
4. echo "one tEst here" | grep -io --color=auto TEST
    

Actual Results:  1. nothing
2. one tEst here (no color highlight)
3. one *tEst* here (highlight word between **)
4. nothing

Expected Results:  1. tEst or test or TEST
2. one *tEst* here (highlight word between **)
3. one *tEst* here (highlight word between **)
4. *tEst* or *test* 

Additional info:

Check with different matchers: -F,G,E,P ..

Comment 1 Thomas Steudten 2004-03-11 20:20:33 UTC
Created attachment 98463 [details]
patch to fix -oi uppercase regex. on RH9

Simple solution for grep Gcompile and Ecompile. No time overhead. Use no
translation table.

Comment 2 Tim Waugh 2004-03-12 09:32:44 UTC
This is fixed in the current Fedora Core 1 package, grep-2.5.1-17.4
(in a different manner, using RE_ICASE).

A pending update for Red Hat Linux 9 also contains this fix.

Comment 3 Thomas Steudten 2004-03-12 12:10:04 UTC
Fix with RE_ICASE?!
Looks like fix with the translation table, there's no RE_ICASE
in the sources after patching ;-)

Comment 4 Tim Waugh 2004-03-12 12:13:19 UTC
Sorry, I meant that the pending update uses RE_ICASE to fix -o -i
problems, and current rawhide already does.