On 2008-11-20, grendelos wrote:
>
> So this is really bugging me.  Why is [a-z] not case sensitive, but [A-Z] is? 
> For example:
>
> # ls -l
> total 0
> -rw-r--r-- 1 root root 0 Nov 20 12:22 xa
> -rw-r--r-- 1 root root 0 Nov 20 12:22 xA
>
> # ls -l x[a-z]
> -rw-r--r-- 1 root root 0 Nov 20 12:22 xa
> -rw-r--r-- 1 root root 0 Nov 20 12:22 xA
>
> # ls -l x[A-Z]
> -rw-r--r-- 1 root root 0 Nov 20 12:22 xA
>
> Any ideas?

    You are using a locale that conflates upper- and lowercase as
    aAbBcC...yYzZ.

    Try it with: export LC_ALL=C

-- 
   Chris F.A. Johnson, webmaster         <http://Woodbine-Gerrard.com>
   ===================================================================
   Author:
   Shell Scripting Recipes: A Problem-Solution Approach (2005, Apress)

Reply via email to