diff --git a/cheat/cheatsheets/uniq b/cheat/cheatsheets/uniq new file mode 100644 index 0000000..994b706 --- /dev/null +++ b/cheat/cheatsheets/uniq @@ -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