On Tue, Mar 10, 2020 at 1:44 PM Bakul Shah <bakul@bitblocks.com> wrote:
On Tue, 10 Mar 2020 13:38:23 -0400 Dan Cross <crossd@gmail.com> wrote:
>
> This begs questions of stability: in the event of non-unique keys and
> non-key fields in the sortable data, which "records" (lines) are kept and
> which are discarded? Surely the "first" is kept and subsequent entries with
> the same key suppressed, but I confess I don't know enough about the
> internals of sed to know even what algorithm it uses (I assume a disk-based
> merge sort?), but I would imagine these details have changed over time.

FreeBSD manpage for sort says that -u implies a stable sort,
similar to -s.

Thanks; that makes sense. I'm still interested in historical data, though. :-)

        - Dan C.