range [A-Z] bug

2006-06-16 Thread Toby Kelsey

I discovered that the range pattern '[A-Z]*' matches the filename 'test' but not
'atest', which appears to be a bug.

This is with bash version "3.00.16(1)-release" and locale "en_GB.UTF-8".

The range appears to match any lowercase letter except for 'a':

~> cd /tmp
/tmp> mkdir q
/tmp> cd q
/tmp/q> touch a b c d e f g h i j k l m n o p q r s t u v w x y z
/tmp/q> echo [A-Z]
b c d e f g h i j k l m n o p q r s t u v w x y z
/tmp/q> echo *
a b c d e f g h i j k l m n o p q r s t u v w x y z

Toby


___
Bug-bash mailing list
Bug-bash@gnu.org
http://lists.gnu.org/mailman/listinfo/bug-bash


Re: range [A-Z] bug

2006-06-16 Thread Eric Blake
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

According to Toby Kelsey on 6/16/2006 6:02 AM:
> I discovered that the range pattern '[A-Z]*' matches the filename 'test'
> but not
> 'atest', which appears to be a bug.

Not a bug, but your setting of locales.  Try repeating the test when
LC_ALL=C is in your environment, to see the difference.  Some locales,
such as en_US.utf8, intentionally do case folding in ranges, so that [A-Z]
is interpreted as [AbBcC...zZ].

- --
Life is short - so eat dessert first!

Eric Blake [EMAIL PROTECTED]
-BEGIN PGP SIGNATURE-
Version: GnuPG v1.4.2.1 (Cygwin)
Comment: Public key at home.comcast.net/~ericblake/eblake.gpg
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iD8DBQFEkp/Q84KuGfSFAYARAkoHAKCjolS/VWNd3okksFw2jA27zTbIFACgkGNd
20psoe+ePYImUumsp4ab0J0=
=U8IH
-END PGP SIGNATURE-


___
Bug-bash mailing list
Bug-bash@gnu.org
http://lists.gnu.org/mailman/listinfo/bug-bash