Mailinglist Archive: opensuse (3441 mails)

< Previous Next >
Re: [opensuse] Globbing broken in bash in 11.1 (really serious bug)
  • From: "Boyd Stephen Smith Jr." <bss@xxxxxxxxxxxxxxxxx>
  • Date: Wed, 14 Jan 2009 12:00:23 -0600
  • Message-id: <200901141200.23539.bss@xxxxxxxxxxxxxxxxx>
On Wednesday 2009 January 14 11:43:37 Josef Wolf wrote:
I just noticed a really serious bug in bash filename globbing:

$ echo /B*
$ echo /[A-C]*
/bin /boot

This is on an ext3 filesystem, which should clearly be case-sensitive!

What's your locale settings? [A-C] means different things depending on your
LC_COLLATE setting. It might mean [ABC], [AaBbC], [AbBcC], or even larger
sets of characters (e.g., involving accents)

If you want [A-C] to mean [ABC] you should set LC_COLLATE to "C" or "POSIX".

BTW: I found out about this bug by running

$ rm -rf /some/dir/[A-Z]*

That's unfortunate, but it's not a bug.
--
Boyd Stephen Smith Jr. ,= ,-_-. =.
bss@xxxxxxxxxxxxxxxxx ((_/)o o(\_))
ICQ: 514984 YM/AIM: DaTwinkDaddy `-'(. .)`-'
http://iguanasuicide.net/ \_/
< Previous Next >
References