Bug 62680 - incorrect pattern matching
incorrect pattern matching
Product: Red Hat Linux
Classification: Retired
Component: bash (Show other bugs)
i386 Linux
medium Severity medium
: ---
: ---
Assigned To: wdovlrrw
Ben Levenson
Depends On:
  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:
Last Closed: 2002-04-04 05:30:18 EST
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
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:

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\\]

$ 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 
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.