bug-coreutils@gnu.org mirror (unofficial)
 help / color / mirror / Atom feed
From: Paul Eggert <eggert@cs.ucla.edu>
To: Rafal Maszkowski <rzm@icm.edu.pl>
Cc: 69901-done@debbugs.gnu.org
Subject: bug#69901: (echo a; echo b) | sort -nu looses some data
Date: Tue, 19 Mar 2024 15:07:01 -0700	[thread overview]
Message-ID: <4bec3b35-29ee-4397-a64a-0ddf44d215aa@cs.ucla.edu> (raw)
In-Reply-To: <ZfmwNa6YIG_NKX-u@ukwial.icm.edu.pl>

On 3/19/24 08:33, Rafal Maszkowski wrote:
> he --debug option advised in
> README does not say anything helpful:
> 
> (echo a; echo b) | sort --debug -nu
> sort: text ordering performed using simple byte comparison
> a
> ^ no match for key

That diagnostic message is helpful. It's telling you that there's no 
number, so everything sorts as being the same, which means 'sort -nu' 
(correctly) outputs just one line.

'sort' has behaved this way for quite some time, and POSIX requires this 
behavior.




      reply	other threads:[~2024-03-19 22:07 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-03-19 15:33 bug#69901: (echo a; echo b) | sort -nu looses some data Rafal Maszkowski
2024-03-19 22:07 ` Paul Eggert [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://lists.gnu.org/mailman/listinfo/bug-coreutils

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=4bec3b35-29ee-4397-a64a-0ddf44d215aa@cs.ucla.edu \
    --to=eggert@cs.ucla.edu \
    --cc=69901-done@debbugs.gnu.org \
    --cc=rzm@icm.edu.pl \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).