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

From: <bugzilla-noreply_at_freebsd.org>
Date: Tue, 08 Jun 2021 15:27:39 +0000
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=256473

--- Comment #3 from Jason W. Bacon <jwb_at_freebsd.org> ---

In tcsh, I have to set LANG=C *and* unset LC_ALL to get expected behavior.

In bash, neither setting matters.

FreeBSD coral.acadix  bacon ~/Test 1038: bash

[bacon_at_coral ~/Test]$ printenv | egrep 'LANG|LC'
LANGUAGE=en_US.UTF-8
LANG=en_US.UTF-8
LC_ALL=en_US.UTF-8

[bacon_at_coral ~/Test]$ ls -d [A-Z]*
Alan Bob

[bacon_at_coral ~/Test]$ 
exit

# Back to tcsh

FreeBSD coral.acadix  bacon ~/Test 1039: printenv | egrep 'LANG|LC'
LANGUAGE=en_US.UTF-8
LC_ALL=en_US.UTF-8
LANG=en_US.UTF-8

FreeBSD coral.acadix  bacon ~/Test 1040: ls -d [A-Z]*
Alan  Bob   zip

FreeBSD coral.acadix  bacon ~/Test 1041: setenv LANG C

FreeBSD coral.acadix  bacon ~/Test 1042: ls -d [A-Z]*
Alan  Bob   zip

FreeBSD coral.acadix  bacon ~/Test 1043: unsetenv LC_ALL

FreeBSD coral.acadix  bacon ~/Test 1044: ls -d [A-Z]*
Alan  Bob

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

Original text of this message