Bug 62680 - incorrect pattern matching
incorrect pattern matching
Status: CLOSED RAWHIDE
Product: Red Hat Linux
Classification: Retired
Component: bash (Show other bugs)
7.1
i386 Linux
medium Severity medium
: ---
: ---
Assigned To: wdovlrrw
Ben Levenson
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2002-04-04 05:30 EST by Vlado Potisk
Modified: 2007-04-18 12:41 EDT (History)
0 users

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2002-04-04 05:30:18 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 Vlado Potisk 2002-04-04 05:30:14 EST
Description of problem:
bash fails to match a file if the character list [...] contains
a backslash - see the example below

Version-Release number of selected component (if applicable):
GNU bash, version 2.04.21(1)-release (i386-redhat-linux-gnu)

How reproducible:
Always

Steps to Reproduce:
1.create two files named aX and a\
2.show all filenames starting with letter a and followed
  either by letter X or a backslash
  2a. run: echo a[X\\]
  2b. run: echo a[\\X]

Actual Results:
$ ls a*
a\  aX

$ echo a[X\\]
a\

$ echo a[\\X]
a\ aX

Expected Results:
those two patterns are equivalent and they should give
the same result, i.e. matching both test filenames
Comment 1 Bernhard Rosenkraenzer 2002-04-04 05:50:38 EST
On a current system: 
 
[bero@zell bero]$ touch aX a\\ 
[bero@zell bero]$ ls a[\\X] 
a\  aX 
[bero@zell bero]$ ls a[X\\] 
a\  aX 
[bero@zell bero]$ rpm -q bash glibc 
bash-2.05a-10 
glibc-2.2.5-30 
Comment 2 Vlado Potisk 2002-04-04 14:44:00 EST
Confirmed, upgrading bash to the rawhide version
solved the problem, no need to upgrade the glibc.

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