I can also confirm this behaviour in grep 2.6.3-3ubuntu1 (Ubuntu 11.04) -- could someone please test whether it still exists in grep 2.8 in Oneiric? If yes, it should be reported upstream (it is similar to http://savannah.gnu.org/bugs/?func=detailitem&item_id=18666 which as been fixed already).
@Alan: The problem *is* color-related. The fact that both lines are matched is not a bug, both 'c' and 'C' sort between 'a' and 'z' in most locales, [a-z] is not equivalent to [[:lower:]]. The only problem is that the second match is not coloured. If you'd want only the first line to be matched, you could either use [[:lower:]] as in your example or echo -e "aBc\naBC" | LC_COLLATE=C grep "aB[a-z]" -- You received this bug notification because you are a member of Ubuntu Bugs, which is subscribed to Ubuntu. https://bugs.launchpad.net/bugs/737481 Title: grep --color prints line but doesn't color it To manage notifications about this bug go to: https://bugs.launchpad.net/ubuntu/+source/grep/+bug/737481/+subscriptions -- ubuntu-bugs mailing list [email protected] https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs
