Kanedaaa Bohater wrote: > Corrupted regexp in ls : It actually isn't a regular expression. It is a file glob.
http://en.wikipedia.org/wiki/Glob_(programming) > $ touch robots.txt > $ ls *[A-Z].txt > robots.txt > > I suggest that it should not list the file. Thank you for your report. However this is expected behavior when your current locale setting has selected a natural language locale such as en_US.UTF-8 and others. In the en_* locales and others dictionary sorting where punctuation is ignored and case is folded is used. Please see these FAQ entries for more information. http://www.gnu.org/software/coreutils/faq/#Sort-does-not-sort-in-normal-order_0021 http://www.gnu.org/software/coreutils/faq/#The-ls-command-is-not-listing-files-in-a-normal-order_0021 Personally I use the following bash settings to get a UTF-8 charset but still specify a standard sorting order. export LANG=en_US.UTF-8 export LC_COLLATE=C Also, specifically in your example with "*[A-Z].txt" being expanded by the command line shell, it is the shell that is doing this expansion, not coreutils. The 'ls' command is being passed the robots.txt file to list. You can verify this by using the echo command to echo print out the arguments. $ echo ls *[A-Z].txt robots.txt This is a general shell behavior and not specific to coreutils. Bob -- To UNSUBSCRIBE, email to [email protected] with a subject of "unsubscribe". Trouble? Contact [email protected]

