On 06/29/2011 09:18 PM, Nicolas Bonifas wrote: >> Quoting from the man page: >> >> "Within a bracket expression, a range expression consists of two >> characters separated by a hyphen. It matches any single character that >> sorts between the two characters, inclusive, using the locale's >> collating sequence and character set. For example, in the default C >> locale, [a-d] is equivalent to [abcd]. Many locales sort characters in >> dictionary order, and in these locales [a-d] is typically not equivalent >> to [abcd]; it might be equivalent to [aBbCcDd], for example. To obtain >> the traditional interpretation of bracket expressions, you can use the C >> locale by setting the LC_ALL environment variable to the value C." >> >> >> Nevertheless, with recent versions of grep you should obtain a result >> which is consistent with what you expect ([a-z] doesn't match uppercase >> letters anymore with en_US.UTF8).
indeed, pre-pending LC_ALL="C" fixes this issue: > echo '1303141571.M26770P15859.m01S=1884W=1934:2S' | LC_ALL="C" egrep '[a-z]$' > --color thanks for your input. but this still does not explain why "egrep --color" does not show the matches when using en_US.UTF8... at least, the matching algorithm and the coloring algorithm should match/color the same pattern, right? thanks, raoul -- ____________________________________________________________________ DI (FH) Raoul Bhatia M.Sc. email. r.bha...@ipax.at Technischer Leiter IPAX - Aloy Bhatia Hava OG web. http://www.ipax.at Barawitzkagasse 10/2/2/11 email. off...@ipax.at 1190 Wien tel. +43 1 3670030 FN 277995t HG Wien fax. +43 1 3670030 15 ____________________________________________________________________ -- To UNSUBSCRIBE, email to debian-bugs-dist-requ...@lists.debian.org with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org