mirror of
https://gitea.com/mcereda/oam.git
synced 2026-02-09 05:44:23 +00:00
Added sort and uniq notes to the knowledge base
This commit is contained in:
20
knowledge base/uniq.md
Normal file
20
knowledge base/uniq.md
Normal 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
|
||||
```
|
||||
Reference in New Issue
Block a user