uniq: add examples

This commit is contained in:
shigemk2 2015-01-10 00:28:18 +09:00
parent 7eb405dcf8
commit a96bd229a6
1 changed files with 12 additions and 0 deletions

12
cheat/cheatsheets/uniq Normal file
View 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