mirror of
https://gitea.com/mcereda/oam.git
synced 2026-02-21 19:14:24 +00:00
31 lines
560 B
Markdown
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
|