Bug 79844 - Bash is incorrectly expanding shell characters
Bash is incorrectly expanding shell characters
Status: CLOSED NOTABUG
Product: Red Hat Linux
Classification: Retired
Component: bash (Show other bugs)
8.0
All Linux
high Severity high
: ---
: ---
Assigned To: Tim Waugh
Ben Levenson
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2002-12-17 09:16 EST by Don Frayer
Modified: 2005-10-31 17:00 EST (History)
1 user (show)

See Also:
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: ---


Attachments (Terms of Use)

  None (edit)
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
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 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

E:
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.

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