1
0
Fork 0
mirror of https://github.com/tldr-pages/tldr.git synced 2024-10-31 14:17:56 +01:00

uniq: add sorting example (#945)

This involves another command, but it's such a natural extension of uniq's `-c` functionality that I feel it's warranted to show here.

We should probably add a sort to the -c example too, because uniq only deals with *sequential* line repetitions.
This commit is contained in:
Waldir Pimenta 2016-07-10 10:26:13 +01:00 committed by Leandro Ostera
parent f080073fad
commit fd5fb3562d

View file

@ -17,3 +17,7 @@
- Display number of occurences of each line along with that line:
`uniq -c {{file}}`
- Display number of occurences of each line, sorted by the most frequent:
`uniq -c {{file}} | sort -nr`