[pappy@chmodx]:$ man uniq

$ uniq

Report or omit repeated lines

DOCUMENTEDSearch & textUbuntu 24.04 LTS baseline

Synopsis

uniq [OPTION]... [INPUT [OUTPUT]]

What it does

Examples

Remove adjacent duplicate lines
sort names.txt | uniq
Count adjacent duplicate lines
sort names.txt | uniq -c

Important details

These examples are intentionally conservative. Command behavior can still depend on filesystem state, permissions, locale, shell, installed package version, and other system configuration. For exact option semantics, the linked authoritative documentation is the source of truth.