Bug 79844 - Bash is incorrectly expanding shell characters
Summary: Bash is incorrectly expanding shell characters
Status: CLOSED NOTABUG
Alias: None
Product: Red Hat Linux
Classification: Retired
Component: bash   
(Show other bugs)
Version: 8.0
Hardware: All Linux
high
high
Target Milestone: ---
Assignee: Tim Waugh
QA Contact: Ben Levenson
URL:
Whiteboard:
Keywords:
Depends On:
Blocks:
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:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2002-12-17 14:44:16 UTC
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


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
exit

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

E:

[dfrayer@red junk]$ echo $SHELL
/bin/bash

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

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

E:

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.