On 10/11/11 09:42 AM, Richard Jones wrote:
I'm probably being really thick, but what's going on here?

    set | grep -i grep
    $ which grep
    /usr/gnu/bin/grep
    $ echo foo | grep '[A-Z]'
    foo

I get the expected behaviour on linux boxes with GNU grep.

Run "locale" to see what locale you are running in:

$ echo foo | env LANG='C' /usr/gnu/bin/grep '[A-Z]'
$ echo foo | env LANG='en_US.UTF-8' /usr/gnu/bin/grep '[A-Z]'
foo

The Solaris UTF-8 locales use case insensitive ordering, so [A-Z]
expands to A, a, B, b, C, c, ... Y, y, Z.

The C locale uses ASCII value ordering, so [A-Z] expands to
A, B, C, ... Y, Z.

--
        -Alan Coopersmith-        [email protected]
         Oracle Solaris Platform Engineering: X Window System


_______________________________________________
OpenIndiana-discuss mailing list
[email protected]
http://openindiana.org/mailman/listinfo/openindiana-discuss

Reply via email to