Pattern matching - unexpected output

Bug #632065 reported by Kevin Jones
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
bash (Ubuntu)
New
Undecided
Unassigned

Bug Description

Binary package hint: bash

When using pattern matching with, for example, ls or rm, non matching patterns are selected. Mainly, case sensitivity seems to be functioning incorrectly, also, in some instances the search will arbitrarily recurse into subdirectories. This has been reproduced on multiple Ubuntu installations also running from Ubuntu 10.4 (32 bit) and Kubuntu 10.4 (64 bit) live CDs. Below is some sample output using ls, along with added comments.

kevin@navi:~/test$ ls -R # normal output showing directory contents
.:
A b capiTal Capital Dir lowercase

./Dir:
A b capiTal Capital lowercase
kevin@navi:~/test$ ls [a-d] #notice uppercase A file
A b
kevin@navi:~/test$ ls [A-D] # notice lowercase b file
A b
kevin@navi:~/test$ ls [a-d]* # notice lowercase & uppercase results (no recurse, as expected)
A b capiTal Capital
kevin@navi:~/test$ ls [a-z]* # notice lower & upper w/ recurse into sub directory
A b capiTal Capital lowercase

Dir:
A b capiTal Capital lowercase
kevin@navi:~/test$ ls [A-D]* # notice lower & upper w/ recurse into sub directory
A b capiTal Capital

Dir:
A b capiTal Capital lowercase
kevin@navi:~/test$ ls [A]* # normal output
A
kevin@navi:~/test$ ls [C]* # normal output
Capital

Revision history for this message
Andrew McCarthy (andrewmccarthy) wrote :

Thanks for taking the time to report this. This is probably the same as bug #120687, which discusses why this happens — your Locale defines how character ranges are handled. I'll mark this bug as a duplicate. Thanks!

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.