mirror of
https://github.com/cheat/cheat.git
synced 2024-12-23 04:59:45 +01:00
uniq: add examples
This commit is contained in:
parent
7eb405dcf8
commit
a96bd229a6
12
cheat/cheatsheets/uniq
Normal file
12
cheat/cheatsheets/uniq
Normal file
@ -0,0 +1,12 @@
|
|||||||
|
# show all lines without duplication
|
||||||
|
sort file | uniq
|
||||||
|
# show not duplicated lines
|
||||||
|
sort file | uniq -u
|
||||||
|
# show duplicated lines only
|
||||||
|
sort file | uniq -d
|
||||||
|
# count all lines
|
||||||
|
sort file | uniq -c
|
||||||
|
# count not duplicated lines
|
||||||
|
sort file | uniq -uc
|
||||||
|
# count only duplicated lines
|
||||||
|
sort file | uniq -c
|
Loading…
Reference in New Issue
Block a user