Files
oam/knowledge base/uniq.md
2022-05-15 00:24:53 +02:00

285 B

Uniq

TL;DR

# Print all but duplicates lines.
uniq path/to/file

# Only print unique lines.
uniq -u path/to/file

# Only print repeating lines.
uniq -d path/to/file

# Count unique lines only.
uniq -cu path/to/file

# Count duplicated lines only.
uniq -cd path/to/file