in reply to Better "uniq" idiom?

If you just want a one-liner to unique a list, I'd use sort -u filesToUniq instead. It will use much less memory than your one-liner, and it's faster to type.

Replies are listed 'Best First'.
Re: Re: Better "uniq" idiom?
by RMGir (Prior) on Mar 20, 2002 at 17:04 UTC
    True, but it has the downside of doing a sort first, which could kill you on a long file which has many repeated lines...

    If the file is mostly unique, your way wins hands down, no question.

    But I usually wind up "uniq"ing on a field, so I usually see only about 10-100 lines per file.

    It would be interesting to benchmark.
    --
    Mike