News for hackers. Stuff that matters.
Re:“But didn't you write an embedded OS?” by emilfihlman on Sunday May 13, 2018 @01:55PM (#17060070)
Broken. uniq alone removes only adjacent duplicates. You need uniq -u to remove all duplicates.
Re:“But didn't you write an embedded OS?” by benchaney on Sunday May 13, 2018 @02:14PM (#17060154)
This is not a concern for already sorted lists.
Re:“But didn't you write an embedded OS?” by JadeNB on Sunday May 13, 2018 @02:30PM (#17060242)
> > sort foo | uniq

> Broken. uniq alone removes only adjacent duplicates. You need uniq -u to remove all duplicates.

As benchaney (https://news.ycombinator.com/item?id=17060154) points out, the duplicates will be adjacent after `sort`.