mirror of
https://github.com/cheat/cheat.git
synced 2024-12-18 18:55:06 +01:00
Trivial edits to uniq cheatsheet
This commit is contained in:
parent
f5ee3d5e29
commit
a5352ad9e5
@ -1,13 +1,18 @@
|
|||||||
# show all lines without duplication
|
# show all lines without duplication
|
||||||
# "sort -u" and "uniq" is the same effect.
|
# `sort -u` and `uniq` is the same effect.
|
||||||
sort file | uniq
|
sort file | uniq
|
||||||
|
|
||||||
# show not duplicated lines
|
# show not duplicated lines
|
||||||
sort file | uniq -u
|
sort file | uniq -u
|
||||||
|
|
||||||
# show duplicated lines only
|
# show duplicated lines only
|
||||||
sort file | uniq -d
|
sort file | uniq -d
|
||||||
|
|
||||||
# count all lines
|
# count all lines
|
||||||
sort file | uniq -c
|
sort file | uniq -c
|
||||||
|
|
||||||
# count not duplicated lines
|
# count not duplicated lines
|
||||||
sort file | uniq -uc
|
sort file | uniq -uc
|
||||||
|
|
||||||
# count only duplicated lines
|
# count only duplicated lines
|
||||||
sort file | uniq -dc
|
sort file | uniq -dc
|
||||||
|
Loading…
Reference in New Issue
Block a user