bug-bash
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Bash ignores case when globbing with character ranges


From: Greg Wooledge
Subject: Re: Bash ignores case when globbing with character ranges
Date: Thu, 13 Aug 2015 13:36:37 -0400
User-agent: Mutt/1.4.2.3i

On Thu, Aug 13, 2015 at 10:15:18AM -0400, gwb@callahans.site wrote:
> Description:
>       bash includes characters of wrong case when globbing with ranges
>       (i.e., [a-z]), after the first instance.

The result of [a-z] in locales other than C or POSIX is implementation-
defined.  If you want to refer to "any lower case letter" portably,
you need to use [[:lower:]] instead.

However, bash does define a shopt called "globasciiranges" which
changes the behavior of [a-z] from locale-based to traditional US-ASCII.
You might want to try that, if you aren't willing to use the portable
syntax, or to dumb down your LC_* variables.



reply via email to

[Prev in Thread] Current Thread [Next in Thread]