file globbing in now case insensitive?

Colin Watson cjwatson at ubuntu.com
Mon Apr 3 11:28:05 UTC 2017


On Mon, Apr 03, 2017 at 10:26:08AM +0200, Ralf Mardorf wrote:
> On Mon, 3 Apr 2017 00:42:29 +0100, Colin Watson wrote:
> >Your example therefore does not work because LC_COLLATE is not set to C
> >until after [A-Z]* has been expanded.  If you're trying to construct
> >something that sets this for just a single command, then a correct
> >version would be:
> >
> >  (LC_COLLATE=C; echo [A-Z]*)
> 
> Aha!
> 
> Why isn't it needed for LANG?

LC_COLLATE overrides LANG for that locale category, so there's no need
to do anything to LANG if you're setting LC_COLLATE.

> I'm running Ubuntu in a systemd-nspawn container...
[...]
> [root at moonstudio test]# locale
> LANG=
> LANGUAGE=
> LC_CTYPE="POSIX"
> LC_NUMERIC="POSIX"
> LC_TIME="POSIX"
> LC_COLLATE="POSIX"

Right.  If you want a matching test, then, "export LANG=en_US.UTF-8" in
this container before you start.

-- 
Colin Watson                                       [cjwatson at ubuntu.com]




More information about the ubuntu-users mailing list