in reply to If it's not broken, don't fix it

Somewhere in my Unix experience, I picked up on the fact that sort -u only "uniq"s over the fields that it is examining, so to get the exact equivalent of sort | uniq, you need to do a final "sort" on the entire string.

This is a feature, not a bug.

But I disagree with your conclusion. Your error is in the prior statement:

Aha! With multiple keys, sort -u does not behave as I had assumed.
The good ol' "assume" word there. Bad. That's the error, not messing with unbroken things. I may agree with your statement in principal, but this was a bad example, as it's sort of a double fault accident.

-- Randal L. Schwartz, Perl hacker