weird bash behaviour in F13 with wildcards

Eric Blake eblake at
Wed May 12 15:49:50 UTC 2010

On 05/12/2010 09:38 AM, Joachim Backes wrote:
> Hi,
> the F13 bash seems to behave incorrect:
> If you have only the files a,B and z in some directory (not more), then
> the command "echo [a-z]" only should echo the text "a z"
> But the bash in F13 echoes the text: "a B z".

That's an issue with your locale.  Probably between your upgrade from
earlier Fedora to F13, your environment was changed to export
LC_ALL=en_US or some such, whereas you were previously used to LC_ALL=C
(or at least LC_COLLATE).

> I checked this in earlier Fedoras, there the behaviour is correct (as
> described: echoes "a z").

Correct is in the eye of the beholder.  This is a frequently reported
non-bug, at least on the upstream bash list.

> Using zsh instead of bash in F13 echoes "a z" and not "a B z". That is
> correct too.

zsh doesn't follow collation rules when expanding [] globs; but bash
does.  POSIX says that the expansion of [] outside of the C locale is
implementation-defined, so either behavior is right.

> Anybody has an idea? Can this behavior depend on environment variables?

Yes, it depends on the locale env vars.

Eric Blake   eblake at    +1-801-349-2682
Libvirt virtualization library

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 619 bytes
Desc: OpenPGP digital signature
Url : 

More information about the test mailing list