Note: This is a beta release of Red Hat Bugzilla 5.0. The data contained within is a snapshot of the live data so any changes you make will not be reflected in the production Bugzilla. Also email is disabled so feel free to test any aspect of the site that you want. File any problems you find or give feedback here.
Bug 79844 - Bash is incorrectly expanding shell characters
Summary: Bash is incorrectly expanding shell characters
Alias: None
Product: Red Hat Linux
Classification: Retired
Component: bash
Version: 8.0
Hardware: All
OS: Linux
Target Milestone: ---
Assignee: Tim Waugh
QA Contact: Ben Levenson
Depends On:
TreeView+ depends on / blocked
Reported: 2002-12-17 14:16 UTC by Don Frayer
Modified: 2005-10-31 22:00 UTC (History)
1 user (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Last Closed: 2002-12-17 14:44:16 UTC

Attachments (Terms of Use)

Description Don Frayer 2002-12-17 14:16:43 UTC
The following example shows how tcsh is case sensitive and bash is not.  This
problem appears to have been around for awhile and can have very serious
consequences when moving files, etc.

[dfrayer@red junk]$ tcsh

[dfrayer@red ~/junk]$ ls [a-z]*
a  b  c  d

[dfrayer@red ~/junk]$ exit

[dfrayer@red junk]$ ls [a-z]*
a  b  c  d


[dfrayer@red junk]$ echo $SHELL

[dfrayer@red junk]$ rpm -qf /bin/bash

Comment 1 Tim Waugh 2002-12-17 14:21:09 UTC
You forgot to set LC_COLLATE=C I think.  See the bash FAQ, E9.

Comment 2 Don Frayer 2002-12-17 14:33:30 UTC
[dfrayer@red dfrayer]$ mkdir junk
[dfrayer@red dfrayer]$ cd junk
[dfrayer@red junk]$ export LC_COLLATE=C
[dfrayer@red junk]$ ls
[dfrayer@red junk]$ touch a b c d
[dfrayer@red junk]$ mkdir E
[dfrayer@red junk]$ ls [a-z]*
a  b  c  d


Comment 3 Don Frayer 2002-12-17 14:44:16 UTC
While I do not agree with the behavior, it looks valid for en_US.  Time to stop
using bash.

Comment 4 Tim Waugh 2002-12-17 15:30:54 UTC
The 'shell variable doesn't update running shell' problem is another bug.  If
you do: 'LC_COLLATE=C bash' the subshell will work as you expect.

Note You need to log in before you can comment on or make changes to this bug.