This is not a bug. In man uniq, you can read:
Note: ’uniq’ does not detect repeated lines unless they are adjacent. You may want to sort the input first, or use ‘sort -u’ without ‘uniq’. And when you use uniq -u, it removes lines that are *adjacent* AND *equal* (if course here "equal" means non-unique). Also note the "successive identical lines" in the uniq description: Discard all but one of successive identical lines from INPUT (or standard input), writing to OUTPUT (or standard output). ** Changed in: coreutils (Ubuntu) Status: New => Invalid -- uniq -u drops wrong lines https://bugs.launchpad.net/bugs/299897 You received this bug notification because you are a member of Ubuntu Bugs, which is subscribed to Ubuntu. -- ubuntu-bugs mailing list ubuntu-bugs@lists.ubuntu.com https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs