bug-bash
[Top][All Lists]
Advanced

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

Re: shopt nocaseglob broken when locales used


From: Chet Ramey
Subject: Re: shopt nocaseglob broken when locales used
Date: Thu, 13 May 2004 21:48:02 -0400
User-agent: Mozilla/5.0 (Windows; U; Win 9x 4.90; en-US; rv:1.6) Gecko/20040113

ch@lathspell.de wrote:

Machine Type: i386-pc-linux-gnu

Bash Version: 2.05b
Patch Level: 0
Release Status: release

Description:
        Globbing seems to be always case insensitive when using any
        locale.

Globbing depends on the collation order imposed by the locale.  Many
locales do not collate A..Za..z as you seem to be expecting (for
example, en_US collates aAbB...zZ).


Repeat-By:
        $ export LC_ALL=de_DE ; ls scons-[A-Z]*
        scons-local-0.95.tar.gz
$ export LC_ALL=C ; ls scons-[A-Z]*
        ls: scons-[A-Z]*: No such file or directory

Don't use character ranges when you're not in the C locale.  Use
[:upper:] and [:lower:] instead.

Chet




reply via email to

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