Files
oam/knowledge base/uniq.md
2023-05-28 13:04:11 +02:00

31 lines
560 B
Markdown

# Uniq
## TL;DR
```sh
# 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
- [The essential Bash cheat sheet]
<!-- project's references -->
<!-- in-article references -->
<!-- internal references -->
<!-- external references -->
[the essential bash cheat sheet]: https://betterprogramming.pub/the-essential-bash-cheat-sheet-e1c3df06560