Bug 143132 - bash expands regexps in an odd manor
Summary: bash expands regexps in an odd manor
Keywords:
Status: CLOSED NOTABUG
Alias: None
Product: Fedora
Classification: Fedora
Component: bash
Version: 3
Hardware: All
OS: Linux
medium
medium
Target Milestone: ---
Assignee: Tim Waugh
QA Contact: Ben Levenson
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2004-12-16 19:27 UTC by David Alden
Modified: 2007-11-30 22:10 UTC (History)
0 users

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2004-12-17 09:54:51 UTC
Type: ---
Embargoed:


Attachments (Terms of Use)

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.


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