mirror of
https://github.com/ivuorinen/cheatsheet-tldr.git
synced 2026-02-17 03:49:18 +00:00
Update cheatsheets
This commit is contained in:
@@ -15,16 +15,16 @@ source: https://github.com/tldr-pages/tldr.git
|
||||
|
||||
- Display only unique lines:
|
||||
|
||||
`sort {{path/to/file}} | uniq -u`
|
||||
`sort {{path/to/file}} | uniq {{[-u|--unique]}}`
|
||||
|
||||
- Display only duplicate lines:
|
||||
|
||||
`sort {{path/to/file}} | uniq -d`
|
||||
`sort {{path/to/file}} | uniq {{[-d|--repeated]}}`
|
||||
|
||||
- Display number of occurrences of each line along with that line:
|
||||
|
||||
`sort {{path/to/file}} | uniq -c`
|
||||
`sort {{path/to/file}} | uniq {{[-c|--count]}}`
|
||||
|
||||
- Display number of occurrences of each line, sorted by the most frequent:
|
||||
|
||||
`sort {{path/to/file}} | uniq -c | sort -nr`
|
||||
`sort {{path/to/file}} | uniq {{[-c|--count]}} | sort {{[-nr|--numeric-sort --reverse]}}`
|
||||
|
||||
Reference in New Issue
Block a user