Hacker News new | past | comments | ask | show | jobs | submit login

Because of this I always use `uniq`.

POSIX' documentation and Apple's man-page at least are bit better formulated than :

    -u Unique: suppress all but one in each set of lines having equal keys.
    [...]
    -n Restrict the sort key to an initial numeric string, [...]
https://pubs.opengroup.org/onlinepubs/9699919799/utilities/s...

than the GNU version - looks like the person documenting `-u` hasn't known what it does (never attribute to malice ...):

    -u, --unique
              with -c, check for strict ordering; without -c, output only  the
              first of an equal run



Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: