https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=275764
Daniel Tameling <tamelingdan...@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |tamelingdan...@gmail.com --- Comment #1 from Daniel Tameling <tamelingdan...@gmail.com> --- Created attachment 247279 --> https://bugs.freebsd.org/bugzilla/attachment.cgi?id=247279&action=edit possible patch The reason for this is that the code is designed for printing the repetition counts in front of the previous line. But if -D is specified, it prints the current line with the exception of the first duplicate. Thus, if one increases the count before printing and not after, one gets a better result: $ uniq -D -c animals.txt 1 bear 2 bear 1 camel 2 camel 3 camel 1 fish 2 fish 1 koala 2 koala 3 koala -- You are receiving this mail because: You are the assignee for the bug.