[TUHS] Command line options and complexity

Bakul Shah bakul at bitblocks.com
Wed Mar 11 03:44:32 AEST 2020


On Tue, 10 Mar 2020 13:38:23 -0400 Dan Cross <crossd at 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.


More information about the TUHS mailing list