bug-bash
[Top][All Lists]
Advanced

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

Re: strange problem with local bash build -> [a-z] matches A


From: Chet Ramey
Subject: Re: strange problem with local bash build -> [a-z] matches A
Date: Tue, 23 Jan 2001 11:16:50 -0500

> I am puzzled with a problem we've found locally. We have bash 2.02 built for
> and on Linux and Solaris 2.5.1. When run on certain Solaris 7 systems the
> [a-z] pattern matching works incorrectly. When a copy of the same bash is run
> on other Solaris 7 systems it works correctly. This is how failure looks:

It's your locale setting.  Range expressions in pattern matching use the
current locale and its collating sequence.  See what $LANG, $LC_ALL,
$LC_COLLATE, and $LC_CTYPE are set to.

The common `en_US' locale setting collates alphabetics like

        AaBbCc...Zz

so [a-z] will match all of the lowercase letters and the uppercase
letters between B and Z.

-- 
``The lyf so short, the craft so long to lerne.'' - Chaucer
( ``Discere est Dolere'' -- chet)

Chet Ramey, CWRU    chet@po.CWRU.Edu    http://cnswww.cns.cwru.edu/~chet/



reply via email to

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