Files
oam/knowledge base/uniq.md
2023-07-09 21:35:14 +02:00

581 B

The uniq command

Table of contents

  1. TL;DR
  2. Sources

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

Sources