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
--
Matej Cepl, http://www.ceplovi.cz/matej/blog/
GPG Finger: 89EF 4BC6 288A BF43 1BAB 25C3 E09F EF25 D964 84AC
In those days spirits were brave, the stakes were high, men were
real men, women were real women and small furry creatures from
Alpha Centauri were real small furry creatures from Alpha
Centauri.
-- Douglas Adams
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]