Report or remove adjacent repeated lines; sort first to group matches.
sort names.txt | uniq -cLINUX COMMAND ATLAS · COMMAND GUIDE
Report or remove adjacent repeated lines; sort first to group matches.
GNU Coreutilsuniq [OPTION]... [INPUT [OUTPUT]]
Report or remove adjacent repeated lines; sort first to group matches.
sort names.txt | uniq -cPrint values that occur more than once.
sort names.txt | uniq -duniq only detects adjacent duplicate lines, so sort the input first when duplicates may be separated.