This is expected behavior (in en_US.UTF-8 the ordering is AaBb, not ABab). You might want to set LC_COLLATE to C if C behavior is desirable.
On Mon, Apr 17, 2023 at 2:06 PM Poul-Henning Kamp <p...@phk.freebsd.dk> wrote: > This surprised me: > > # mkdir /tmp/P > # cd /tmp/P > # touch FOO > # touch bar > # env LANG=C.UTF-8 find . -name '[A-Z]*' -print > ./FOO > # env LANG=en_US.UTF-8 find . -name '[A-Z]*' -print > ./FOO > ./bar > > Really ?! > > -- > Poul-Henning Kamp | UNIX since Zilog Zeus 3.20 > p...@freebsd.org | TCP/IP since RFC 956 > FreeBSD committer | BSD since 4.3-tahoe > Never attribute to malice what can adequately be explained by incompetence. > >