mirror of https://github.com/cheat/cheat.git
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
|
@ -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…
Reference in New Issue