Tag Info

New answers tagged


That behavior is required by POSIX, and you're safe to rely on it. Another note that you want to set your locale to C to get consistent behavior. In locale with collation elements have the same sorting order, you will have strange result. On GNU system with UTF-8 locale: $ printf '%b\n' '\U2461' '\U2460' | sort ② ① or: $ printf '%s\n' A B a b | sort a ...


Yes. The normative answer can be found here: If the pattern matches any existing filenames or pathnames, the pattern shall be replaced with those filenames and pathnames, sorted according to the collating sequence in effect in the current locale. http://pubs.opengroup.org/onlinepubs/9699919799/utilities/V3_chap02.html#tag_18_13_02


Apparently there is a problem in nix. There is an issue on github with a proposed workaround by setting the LOCALE_ARCHIVE variable. If you already have nix installed just do: nix-env -i glibc-locales And in you bash profile: export LOCALE_ARCHIVE="$(nix-env --installed --no-name --out-path --query glibc-locales)/lib/locale/locale-archive"


Add -utf8 and -nobs, it will be able to display special letters.

Top 50 recent answers are included