Bug 143132 - bash expands regexps in an odd manor
bash expands regexps in an odd manor
Status: CLOSED NOTABUG
Product: Fedora
Classification: Fedora
Component: bash (Show other bugs)
3
All Linux
medium Severity medium
: ---
: ---
Assigned To: Tim Waugh
Ben Levenson
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2004-12-16 14:27 EST by David Alden
Modified: 2007-11-30 17:10 EST (History)
0 users

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2004-12-17 04:54:51 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 David Alden 2004-12-16 14:27:07 EST
From Bugzilla Helper:
User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.7.3)
Gecko/20040922

Description of problem:
Hi,
  Bash doesn't seem to be expanding regexps as I would expect (csh and
ash do not exhibit this problem).  With LANG set to en_US.UTF-8, "ls
[A-C]*" is NOT the same as "ls [ABC]*".  The first ls returns lower
case b and c files while the second does not.  If I change LANG to be
"C", it works as I would expect it to (both ls's return the same output).


Version-Release number of selected component (if applicable):
bash-2.05b-38

How reproducible:
Always

Steps to Reproduce:
1. mkdir /tmp/fubar && cd /tmp/fubar && touch a1 b1 c1 d1 A1 B1 C1 D1
2. export LANG=en_US.UTF-8
3. ls [A-C]*


Actual Results:  A b B c C

Expected Results:  A B C

Additional info:
Comment 1 Tim Waugh 2004-12-17 04:54:51 EST
(Slight terminology correction: these are not regexps but pathname expansion
patterns.)

The behaviour you see is intentional.  See the bash FAQ, question E9:

  http://www.faqs.org/faqs/unix-faq/shell/bash/
Comment 2 David Alden 2004-12-17 07:30:16 EST
Sorry to waste your time -- thanks for the pointer.

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