Bug 72641 - -i doesn't work together with -o
Summary: -i doesn't work together with -o
Keywords:
Status: CLOSED RAWHIDE
Alias: None
Product: Red Hat Linux
Classification: Retired
Component: grep
Version: 8.0
Hardware: i386
OS: Linux
medium
medium
Target Milestone: ---
Assignee: Tim Waugh
QA Contact: Mike McLean
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2002-08-26 09:19 UTC by David Nečas
Modified: 2007-04-18 16:46 UTC (History)
2 users (show)

Fixed In Version:
Clone Of:
Environment:
Last Closed: 2002-10-21 12:39:35 UTC
Embargoed:


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

Description David Nečas 2002-08-26 09:19:33 UTC
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 20:04:51 UTC
Created attachment 80264 [details]
grep-2.5.1-oi.patch

Comment 2 Tim Waugh 2002-10-13 20:08:39 UTC
Patch sent upstream.

Comment 3 Tim Waugh 2002-10-22 14:00:40 UTC
Fixed package is grep-2.5.1-5.

Comment 4 Thomas Steudten 2004-03-10 21:56:17 UTC
Created attachment 98442 [details]
patch for grep -oi and --color bug for uppercase expr.

Comment 5 Thomas Steudten 2004-03-10 21:58:26 UTC
Created attachment 98443 [details]
patch for grep -oi and --color bug for uppercase expr.

Comment 6 Thomas Steudten 2004-03-10 21:58:36 UTC
Created attachment 98444 [details]
patch for grep -oi and --color bug for uppercase expr.

Comment 7 Thomas Steudten 2004-03-10 21:58:47 UTC
Created attachment 98445 [details]
patch for grep -oi and --color bug for uppercase expr.

Comment 8 Thomas Steudten 2004-03-10 22:02:39 UTC
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 12:29:36 UTC
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 19:30:32 UTC
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.