mirror of
https://github.com/cheat/cheat.git
synced 2025-04-09 03:04:03 +02:00
Merge branch 'master' of https://github.com/shigemk2/cheat into shigemk2-master
* 'master' of https://github.com/shigemk2/cheat: Refer sort -u Fix dc option uniq: add examples
This commit is contained in:
commit
f5ee3d5e29
13
cheat/cheatsheets/uniq
Normal file
13
cheat/cheatsheets/uniq
Normal file
@ -0,0 +1,13 @@
|
|||||||
|
# show all lines without duplication
|
||||||
|
# "sort -u" and "uniq" is the same effect.
|
||||||
|
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 -dc
|
Loading…
x
Reference in New Issue
Block a user