[Bug 256473] FreeBSD shells are case insensitive for character ranges

From: <bugzilla-noreply_at_freebsd.org>
Date: Tue, 08 Jun 2021 16:08:23 +0000

--- Comment #4 from Stefan E├čer <se_at_FreeBSD.org> ---
(In reply to Jason W. Bacon from comment #2)

> I created a simple test case to reduce noise in this thread, and things got weirder:
> Default shell is tcsh.
> FreeBSD coral.acadix  bacon ~/Test 1032: ls
> aardvark  Alan      Bob       zip
> FreeBSD coral.acadix  bacon ~/Test 1033: ls -d [A-Z]*
Alan  Bob   zip

This is to be expected. The sequence is: "AaBb..Zz" and you are selecting for
all initial letters except for the files starting with "z" (which comes after

> FreeBSD coral.acadix  bacon ~/Test 1034: ls -d [a-z]*
> aardvark  Alan      Bob       zip

This is to be expected. The sequence is as above and you are selecting for all
except those starting with "A" (which is "to the left" of "a").

> FreeBSD coral.acadix  bacon ~/Test 1035: bash
> [bacon_at_coral ~/Test]$ ls -d [A-Z]*
> Alan Bob
> [bacon_at_coral ~/Test]$ ls -d [a-z]*
> aardvark zip
> [/quote]

This is the behavior of BASH if the "globasciiranges" shell option is set to

Check this with the following command:

$ shopt globasciiranges
globasciiranges on

This is an off by default option according to the bash man-page, but apparently
set in your environment.

With this variable set to off, bash behaves exactly like the other shells.

You are receiving this mail because:
You are the assignee for the bug.
Received on Tue Jun 08 2021 - 16:08:23 UTC

Original text of this message