[Bug 2152822] [NEW] comm and sort are incompatible in 26.04 LTS
Serge
2152822 at bugs.launchpad.net
Sun May 17 06:59:47 UTC 2026
Public bug reported:
After upgrading from 25.10 to 26.04, I've noticed one of my scripts
fail. It sorted some files with `sort` and then compared them with
`comm`, and now it fails with messages like `comm: input is not in
sorted order`.
Turns out the current version of `sort` supports locale-based collation,
so it have sorted the files correctly according to my
`LC_COLLATE=en_US.UTF-8` locale; while `comm` doesn't support collation,
and requires files sorted in `C` locale.
As most Ubuntu systems have locales other than `C`, this makes `sort`
and `comm` incompatible under default conditions.
Example: prepare two `en_US`-sorted files and compare them:
$ cat en_US_1.txt
aa
Aa
ab
Ab
$ cat en_US_2.txt
bb
Bb
bc
Bc
$ LC_COLLATE=en_US.UTF-8 comm -12 en_US_1.txt en_US_2.txt
comm: file 1 is not in sorted order
comm: file 2 is not in sorted order
comm: input is not in sorted order
Github issue: https://github.com/uutils/coreutils/issues/12253
A similar issue was mentioned in bug 2117711
** Affects: rust-coreutils (Ubuntu)
Importance: Undecided
Status: New
** Description changed:
After upgrading from 25.10 to 26.04, I've noticed one of my scripts
fail. It sorted some files with `sort` and then compared them with
`comm`, and now it fails with messages like `comm: input is not in
sorted order`.
Turns out the current version of `sort` supports locale-based collation,
so it have sorted the files correctly according to my
`LC_COLLATE=en_US.UTF-8` locale; while `comm` doesn't support collation,
and requires files sorted in `C` locale.
As most Ubuntu systems have locales other than `C`, this makes `sort`
and `comm` incompatible under default conditions.
Example: prepare two `en_US`-sorted files and compare them:
- ```
- $ cat en_US_1.txt
+
+ $ cat en_US_1.txt
aa
Aa
ab
Ab
- $ cat en_US_2.txt
+ $ cat en_US_2.txt
bb
Bb
bc
Bc
$ LC_COLLATE=en_US.UTF-8 comm -12 en_US_1.txt en_US_2.txt
comm: file 1 is not in sorted order
comm: file 2 is not in sorted order
comm: input is not in sorted order
- ```
+
Github issue: https://github.com/uutils/coreutils/issues/12253
** Description changed:
After upgrading from 25.10 to 26.04, I've noticed one of my scripts
fail. It sorted some files with `sort` and then compared them with
`comm`, and now it fails with messages like `comm: input is not in
sorted order`.
Turns out the current version of `sort` supports locale-based collation,
so it have sorted the files correctly according to my
`LC_COLLATE=en_US.UTF-8` locale; while `comm` doesn't support collation,
and requires files sorted in `C` locale.
As most Ubuntu systems have locales other than `C`, this makes `sort`
and `comm` incompatible under default conditions.
Example: prepare two `en_US`-sorted files and compare them:
$ cat en_US_1.txt
aa
Aa
ab
Ab
$ cat en_US_2.txt
bb
Bb
bc
Bc
$ LC_COLLATE=en_US.UTF-8 comm -12 en_US_1.txt en_US_2.txt
comm: file 1 is not in sorted order
comm: file 2 is not in sorted order
comm: input is not in sorted order
Github issue: https://github.com/uutils/coreutils/issues/12253
+ A similar issue was mentioned in #2117711
** Description changed:
After upgrading from 25.10 to 26.04, I've noticed one of my scripts
fail. It sorted some files with `sort` and then compared them with
`comm`, and now it fails with messages like `comm: input is not in
sorted order`.
Turns out the current version of `sort` supports locale-based collation,
so it have sorted the files correctly according to my
`LC_COLLATE=en_US.UTF-8` locale; while `comm` doesn't support collation,
and requires files sorted in `C` locale.
As most Ubuntu systems have locales other than `C`, this makes `sort`
and `comm` incompatible under default conditions.
Example: prepare two `en_US`-sorted files and compare them:
$ cat en_US_1.txt
aa
Aa
ab
Ab
$ cat en_US_2.txt
bb
Bb
bc
Bc
$ LC_COLLATE=en_US.UTF-8 comm -12 en_US_1.txt en_US_2.txt
comm: file 1 is not in sorted order
comm: file 2 is not in sorted order
comm: input is not in sorted order
Github issue: https://github.com/uutils/coreutils/issues/12253
- A similar issue was mentioned in #2117711
+ A similar issue was mentioned in bug 2117711
** Summary changed:
- comm and sort are incompatible
+ comm and sort are incompatible in 26.04 LTS
--
You received this bug notification because you are a member of Ubuntu
Foundations Bugs, which is subscribed to rust-coreutils in Ubuntu.
https://bugs.launchpad.net/bugs/2152822
Title:
comm and sort are incompatible in 26.04 LTS
Status in rust-coreutils package in Ubuntu:
New
Bug description:
After upgrading from 25.10 to 26.04, I've noticed one of my scripts
fail. It sorted some files with `sort` and then compared them with
`comm`, and now it fails with messages like `comm: input is not in
sorted order`.
Turns out the current version of `sort` supports locale-based
collation, so it have sorted the files correctly according to my
`LC_COLLATE=en_US.UTF-8` locale; while `comm` doesn't support
collation, and requires files sorted in `C` locale.
As most Ubuntu systems have locales other than `C`, this makes `sort`
and `comm` incompatible under default conditions.
Example: prepare two `en_US`-sorted files and compare them:
$ cat en_US_1.txt
aa
Aa
ab
Ab
$ cat en_US_2.txt
bb
Bb
bc
Bc
$ LC_COLLATE=en_US.UTF-8 comm -12 en_US_1.txt en_US_2.txt
comm: file 1 is not in sorted order
comm: file 2 is not in sorted order
comm: input is not in sorted order
Github issue: https://github.com/uutils/coreutils/issues/12253
A similar issue was mentioned in bug 2117711
To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/rust-coreutils/+bug/2152822/+subscriptions
More information about the foundations-bugs
mailing list