On 06/08/2010 03:48 PM, Iosif Fettich wrote:
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'...?!!)
This is locale dependent.
In your locales lower letters are before capital letters, therefore
[a-z] does not include capital.
In C locales the sequence is capital letters and then lower letters (A B
Z a b z).
If you want all letters, lowers and capitals, you can use [a-zA-z]
RR