URL:
  <http://savannah.gnu.org/bugs/?27196>

                 Summary: Using -o and -i options together is broken
                 Project: grep
            Submitted by: None
            Submitted on: Thu 06 Aug 2009 11:52:00 PM UTC
                Category: None
                Severity: 3 - Normal
              Item Group: None
                  Status: None
                 Privacy: Public
             Assigned to: None
             Open/Closed: Open
         Discussion Lock: Any

    _______________________________________________________

Details:

Hi,

Using -i with -o produces unexpected results.

testfile contains:
Bonjour le monde.
Hello world.
Bonjour le monde.

But the command:
grep -o -i HELLO testfile
produces no output.

If I specify the pattern in all lowercase (grep -o -i hello testfile), I get
the expected result:
Hello

I would expect it to work the same regardless of the case of the pattern,
since -i means ignore case.  If -o is not specified, the case of the pattern
does not matter.

I have tested in both 2.5.4 and 2.6-cvs.




    _______________________________________________________

Reply to this item at:

  <http://savannah.gnu.org/bugs/?27196>

_______________________________________________
  Message sent via/by Savannah
  http://savannah.gnu.org/



Reply via email to