bug-grep
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[bug #12995] grep with --color and -i causes color match not to be displ


From: boud indymedia
Subject: [bug #12995] grep with --color and -i causes color match not to be displayed
Date: Fri, 12 Jan 2007 13:23:53 +0000
User-agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.7.10) Gecko/20050911 Firefox/1.0.6 (Debian package 1.0.6-5)

Follow-up Comment #2, bug #12995 (project grep):

SUMMARY:
variant of bug #12995: --ignore-case fails with --only-matching option 


SEVERITY: more important than as indicated by the initial bug report,
since this is not just about highlighting.

SYSTEM:
address@hidden uname -a
Linux Knoppix 2.6.12 #2 SMP Tue Aug 9 23:20:52 CEST 2005 i686 GNU/Linux


PACKAGE VERSION:
grep --version
grep (GNU grep) 2.5.1


LOCALE:
address@hidden locale
LANG=pl_PL
LC_CTYPE="C"
LC_NUMERIC="C"
LC_TIME="C"
LC_COLLATE="C"
LC_MONETARY="C"
LC_MESSAGES="C"
LC_PAPER="C"
LC_NAME="C"
LC_ADDRESS="C"
LC_TELEPHONE="C"
LC_MEASUREMENT="C"
LC_IDENTIFICATION="C"
LC_ALL=C


EXAMPLE OF PROBLEM:

#This is OK
address@hidden echo "a A a A" |grep --only-matching a
a
a

#This is wrong.
address@hidden echo "a A a A" | \
grep --ignore-case --only-matching a
a
a

# This is OK.
address@hidden echo "a A a A" |grep --only-matching "[aA]"
a
A
a
A
   
# Setting the locale corrects the bug, as described in #12995.
address@hidden echo "a A a A" | \
LC_ALL="en_US.utf8" grep --ignore-case --only-matching a
a
A
a
A


CONCLUSION:
The bug affects not only highlighting, but also the  --only-matching 
option.



    _______________________________________________________

Reply to this item at:

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

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





reply via email to

[Prev in Thread] Current Thread [Next in Thread]