Bug 143132

Summary: bash expands regexps in an odd manor
Product: [Fedora] Fedora Reporter: David Alden <alden>
Component: bashAssignee: Tim Waugh <twaugh>
Status: CLOSED NOTABUG QA Contact: Ben Levenson <benl>
Severity: medium Docs Contact:
Priority: medium    
Version: 3   
Target Milestone: ---   
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2004-12-17 09:54:51 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description David Alden 2004-12-16 19:27:07 UTC
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 09:54:51 UTC
(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 12:30:16 UTC
Sorry to waste your time -- thanks for the pointer.