[27072] in Athena Bugs

home help back first fref pref prev next nref lref last post

Athena linux 9.4.36: locales and bash

daemon@ATHENA.MIT.EDU (John Hawkinson)
Fri Mar 30 20:26:12 2007

Date: Fri, 30 Mar 2007 20:26:01 -0400 (EDT)
Message-Id: <200703310026.l2V0Q1Vx013090@multics.mit.edu>
To: bugs@mit.edu
From: John Hawkinson <jhawk@mit.edu>
X-Spam-Flag: NO
X-Spam-Score: 0.00
Errors-To: bugs-bounces@mit.edu

It appears that bash does case-insensitive shell globbing when the
locale is en_US.UTF-8 (which is the default that I don't change).
This seems horribly broken to me (surely it breaks lots of scripts?
It certainly breaks my use of the shell), but I don't understand
locales.

--jhawk

[cutter-john!jhawk] /tmp/test> touch A a B b C c
[cutter-john!jhawk] /tmp/test> ls
a  A  b  B  c  C
[cutter-john!jhawk] /tmp/test> echo [A-]*
A
[cutter-john!jhawk] /tmp/test> echo [A-Z]*
A B C
[cutter-john!jhawk] /tmp/test> bash
bash-3.00$ echo [A-Z]*
A b B c C
bash-3.00$ locale
LANG=en_US.UTF-8
LC_CTYPE="en_US.UTF-8"
LC_NUMERIC="en_US.UTF-8"
LC_TIME="en_US.UTF-8"
LC_COLLATE="en_US.UTF-8"
LC_MONETARY="en_US.UTF-8"
LC_MESSAGES="en_US.UTF-8"
LC_PAPER="en_US.UTF-8"
LC_NAME="en_US.UTF-8"
LC_ADDRESS="en_US.UTF-8"
LC_TELEPHONE="en_US.UTF-8"
LC_MEASUREMENT="en_US.UTF-8"
LC_IDENTIFICATION="en_US.UTF-8"
LC_ALL=
bash-3.00$ export LC_ALL=C
bash-3.00$ echo [A-Z]*
A B C
bash-3.00$ 

home help back first fref pref prev next nref lref last post