Bug 79844

Summary: Bash is incorrectly expanding shell characters
Product: [Retired] Red Hat Linux Reporter: Don Frayer <dfrayer>
Component: bashAssignee: Tim Waugh <twaugh>
Status: CLOSED NOTABUG QA Contact: Ben Levenson <benl>
Severity: high Docs Contact:
Priority: high    
Version: 8.0CC: dfrayer
Target Milestone: ---   
Target Release: ---   
Hardware: All   
OS: Linux   
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2002-12-17 09:44:16 EST Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---

Description Don Frayer 2002-12-17 09:16:43 EST
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 09:21:09 EST
You forgot to set LC_COLLATE=C I think.  See the bash FAQ, E9.
Comment 2 Don Frayer 2002-12-17 09:33:30 EST
[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 09:44:16 EST
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 10:30:54 EST
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.