It is because uutils 'sort' is broken with locales, at least in 0.8.0, and treats punctuation as if it didn't exist:
``` $ export LC_ALL=en_US.UTF-8 $ printf 'U.S.A\nU-S-A\nU S A\n' | sort -u U.S.A $ printf 'U.S.A\nU-S-A\nU S A\n' | gnusort -u U S A U-S-A U.S.A ``` Without the '-u' option it just returns whatever order it was given: ``` $ for i in $(seq 3); do printf 'U.S.A\nU-S-A\nU S A\n' | shuf | sort; echo ------; done U S A U-S-A U.S.A ------ U.S.A U S A U-S-A ------ U S A U.S.A U-S-A ------ ``` In your specific example this causes the following lines not to be sorted, which makes 'comm' angry: ``` Color Emoji font Colored Man Pages ``` It was also reported here [1], but got no attention. It has caused issues in other places as well, see [2] and likely others. [1] https://bugs.launchpad.net/ubuntu/+source/rust-coreutils/+bug/2154364 [2] https://github.com/dehydrated-io/dehydrated/issues/999 ** Bug watch added: github.com/dehydrated-io/dehydrated/issues #999 https://github.com/dehydrated-io/dehydrated/issues/999 -- You received this bug notification because you are a member of Ubuntu Bugs, which is subscribed to Ubuntu. https://bugs.launchpad.net/bugs/2127885 Title: sort command pipe output fails To manage notifications about this bug go to: https://bugs.launchpad.net/ubuntu/+source/rust-coreutils/+bug/2127885/+subscriptions -- ubuntu-bugs mailing list [email protected] https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs
