It would be a useful enhancement to uniq to replace all lines considered non-uniq (i.e. those that would be removed from the output) with a message about how many times the previous line was repeated.
I.e. $ cat <<EOF | uniq --replace-with-message '[previous line repeated %d times]' first line second line repeated line repeated line repeated line repeated line repeated line third line EOF first line second line repeated line [previous line repeated 4 times] third line Cheers, b.
signature.asc
Description: This is a digitally signed message part