Bug 72641 - -i doesn't work together with -o
-i doesn't work together with -o
Status: CLOSED RAWHIDE
Product: Red Hat Linux
Classification: Retired
Component: grep (Show other bugs)
8.0
i386 Linux
medium Severity medium
: ---
: ---
Assigned To: Tim Waugh
Mike McLean
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2002-08-26 05:19 EDT by David Nečas
Modified: 2007-04-18 12:46 EDT (History)
2 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2002-10-21 08:39:35 EDT
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)
grep-2.5.1-oi.patch (1.06 KB, patch)
2002-10-13 16:04 EDT, Tim Waugh
no flags Details | Diff
patch for grep -oi and --color bug for uppercase expr. (3.55 KB, patch)
2004-03-10 16:56 EST, Thomas Steudten
no flags Details | Diff
patch for grep -oi and --color bug for uppercase expr. (3.55 KB, patch)
2004-03-10 16:58 EST, Thomas Steudten
no flags Details | Diff
patch for grep -oi and --color bug for uppercase expr. (3.55 KB, patch)
2004-03-10 16:58 EST, Thomas Steudten
no flags Details | Diff
patch for grep -oi and --color bug for uppercase expr. (3.55 KB, patch)
2004-03-10 16:58 EST, Thomas Steudten
no flags Details | Diff
Replace my patch from march 10 2004 (3.54 KB, patch)
2004-03-11 14:30 EST, Thomas Steudten
no flags Details | Diff

  None (edit)
Description David Nečas 2002-08-26 05:19:33 EDT
From Bugzilla Helper:
User-Agent: Mozilla/5.0 Galeon/1.2.5 (X11; Linux i686; U;) Gecko/0

Description of problem:
The -o option causes patterns to be always matched case-sensitive, regardless of -i.

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


How reproducible:
Always

Steps to Reproduce:
1. echo 'Catch me!' | grep -i catch
2. echo 'Catch me!' | grep -o -i catch
3. echo 'Catch me!' | grep -o -i Catch
	

Actual Results:
1. Catch me!
2. (nothing)
3. Catch

Expected Results:
1. Catch me!
2. Catch
3. Catch

Additional info:

Important is step 2., the other (1., 3.) shows -i and -o work alone.

This is not a RawHide problem, grep-2.5.1-1 from 7.3 seems to suffer the same
problem.
Comment 1 Tim Waugh 2002-10-13 16:04:51 EDT
Created attachment 80264 [details]
grep-2.5.1-oi.patch
Comment 2 Tim Waugh 2002-10-13 16:08:39 EDT
Patch sent upstream.
Comment 3 Tim Waugh 2002-10-22 10:00:40 EDT
Fixed package is grep-2.5.1-5.
Comment 4 Thomas Steudten 2004-03-10 16:56:17 EST
Created attachment 98442 [details]
patch for grep -oi and --color bug for uppercase expr.
Comment 5 Thomas Steudten 2004-03-10 16:58:26 EST
Created attachment 98443 [details]
patch for grep -oi and --color bug for uppercase expr.
Comment 6 Thomas Steudten 2004-03-10 16:58:36 EST
Created attachment 98444 [details]
patch for grep -oi and --color bug for uppercase expr.
Comment 7 Thomas Steudten 2004-03-10 16:58:47 EST
Created attachment 98445 [details]
patch for grep -oi and --color bug for uppercase expr.
Comment 8 Thomas Steudten 2004-03-10 17:02:39 EST
Sorry, some browser-back problem..

There´s another problem in the -oi and --color context with uppercase
expression. 
Test with: echo "one tEst here" | grep -X -i --color=auto TEST and
with -o, where X:none,F,G,E,P.
-F,-P are fine.
Add patch to fix this.
Comment 9 Tim Waugh 2004-03-11 07:29:36 EST
Thomas, please open a separate bug report for this.

Also, you need to be more specific about what the problem is, including:

- the version number (and release) of the package you tried
- the exact options you use (enumerate the command lines)
- the output you *get*
- the output you *expect*

Thanks.
Comment 10 Thomas Steudten 2004-03-11 14:30:32 EST
Created attachment 98462 [details]
Replace my patch from march 10 2004

It´s so buggy here. My patch from yesterday march 10 was shadowing a local
variable. Test runs fine, but I re-checked it today and fix it.
Hower, I´ll open a new bug report for this..

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