Move pages under tldr, lint run.sh, update docs

This commit is contained in:
2024-02-21 13:58:43 +02:00
parent 3d653cc7e6
commit 2c475fa62d
4806 changed files with 36 additions and 35 deletions

30
tldr/uniq Normal file
View File

@@ -0,0 +1,30 @@
---
syntax: markdown
tags: [tldr, common]
source: https://github.com/tldr-pages/tldr.git
---
# uniq
> Output the unique lines from a input or file.
> Since it does not detect repeated lines unless they are adjacent, we need to sort them first.
> More information: <https://www.gnu.org/software/coreutils/uniq>.
- Display each line once:
`sort {{path/to/file}} | uniq`
- Display only unique lines:
`sort {{path/to/file}} | uniq -u`
- Display only duplicate lines:
`sort {{path/to/file}} | uniq -d`
- Display number of occurrences of each line along with that line:
`sort {{path/to/file}} | uniq -c`
- Display number of occurrences of each line, sorted by the most frequent:
`sort {{path/to/file}} | uniq -c | sort -nr`