tags 35587 notabug
close 35587
stop

Hello,

On 2019-05-05 1:01 p.m., Toralf Förster wrote:
I'd expect "B" being the first line here:

        echo a B c d | xargs -n 1 | sort

using sys-apps/coreutils-8.30 at a stable hardened Gentoo Linux, but it is "a". 
Is this a bug or a feature?

This is just a matter of your locale (e.g. "de_DE.UTF8" ?)
that sorts letters without regard to case.

If you force C locale you'll get "B" first:

  $ echo a B c d | xargs -n 1 | LC_ALL=C sort
  B
  a
  c
  d


Adding "--debug" will show a warning and help diagnose such issues in the future:

  $ sort --debug
  sort: using ‘ca_EN.utf8’ sorting rules
  ...
  ...

As such, I'm closing this as not-a-bug, but discussion can continue by replying to this thread.

-assaf





Reply via email to