>_ IzzyLab

Topic breakdown

uniq collapses only adjacent identical lines, so on its own it sees only consecutive duplicates. To count all repeats across the whole file, the data is first brought to a form where identical lines stand next to each other (usually by sorting), and only then counted. The -c flag adds a count of occurrences to each unique line — this is the classic "sort then count" idiom that underlies frequency analysis in the shell.

What's checked

  1. repeat count is correct

What it looks like