Matej Cepl wrote:
Randomthots wrote:
I'm interested in why you believe the two commands would yield different
results? AFAIK they should be completely equivalent.
I have hit this sometime earlier when trying to discard duplicates from a
huge file and I wasn't successful with sort | uniq combo. I do not remember
exactly what were the reasons, but I have stuck with sort -u rather. When
trying to find out more now, I found this in coreutils info on uniq:
The input need not be sorted, but repeated input lines are detected
only if they are adjacent. If you want to discard non-adjacent
duplicate lines, perhaps you want to use `sort -u'. sort invocation.
I still believe that sort | uniq should work, but it didn't for me (and
apparently not only for me) and sort -u works. And not only that but even
uniq authors recommend not using their own utility, so I will continue to
use stay with sort -u.
Matej
Interesting. Learn something every day. Thanks for the info.
--
Rod
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]