Added sort and uniq notes to the knowledge base

This commit is contained in:
Michele Cereda
2022-05-05 15:12:38 +02:00
parent b26e7ba6fa
commit 5e97e30ffe
2 changed files with 37 additions and 0 deletions

20
knowledge base/uniq.md Normal file
View File

@@ -0,0 +1,20 @@
# Uniq
## TL;DR
```shell
# 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
```