--- Begin Message ---
Subject: |
Subject: inaccurate character class processing |
Date: |
Tue, 8 Jun 2010 16:48:08 +0300 (EEST) |
User-agent: |
Alpine 2.00 (LFD 1167 2008-08-23) |
Configuration Information [Automatically generated, do not change]:
Machine: x86_64
OS: linux-gnu
Compiler: gcc
Compilation CFLAGS: -DPROGRAM='bash' -DCONF_HOSTTYPE='x86_64'
-DCONF_OSTYPE='linux-gnu' -DCONF_MACHTYPE='x86_64-unknown-linux-gnu'
-DCONF_VENDOR='unknown' -DLOCALEDIR='/usr/local/share/locale'
-DPACKAGE='bash' -DSHELL -DHAVE_CONFIG_H -I. -I. -I./include -I./lib
-g -O2
uname output: Linux pony.netsoft.ro 2.6.32.12-115.fc12.x86_64 #1 SMP Fri
Apr 30 19:46:25 UTC 2010 x86_64 x86_64 x86_64 GNU/Linux
Machine Type: x86_64-unknown-linux-gnu
Bash Version: 4.1
Patch Level: 0
Release Status: release
Description:
(I'm not sure if this a bash or a coreutils issue).
ls [A-Z]*
doesn't work as expected/documented.
I'd want/expect it to list the filenames starting with an uppercase
letter.
Thank you for looking at it!
Repeat-By:
In an empty directory, create files like
touch a A b B z Z
Now,
ls [A-Z]*
outputs
A b B z Z
(why 'b' and 'z' - and/or where's 'a'...?!!)
and
ls [a-z]*
outputs
a A b B z
(why 'A' and 'B' - and/or where's 'Z'...?!!)
--- End Message ---
--- Begin Message ---
Subject: |
Re: bug#6377: Subject: inaccurate character class processing |
Date: |
Tue, 08 Jun 2010 15:57:16 +0100 |
User-agent: |
Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.9.1.8) Gecko/20100227 Thunderbird/3.0.3 |
tags 6377 + notabug
On 08/06/10 14:48, Iosif Fettich wrote:
> (I'm not sure if this a bash or a coreutils issue).
>
> ls [A-Z]*
>
> doesn't work as expected/documented.
The logic is in bash but it's not an issue.
It's using the collating sequence of your locale
$ touch a A b B z Z
$ echo [A-Z]*
A b B z Z
$ export LANG=C
$ echo [A-Z]*
A B Z
--- End Message ---