From a96bd229a6d44651e5f2d1fbf4f9d9208fc6dbd4 Mon Sep 17 00:00:00 2001 From: shigemk2 Date: Sat, 10 Jan 2015 00:28:18 +0900 Subject: [PATCH] uniq: add examples --- cheat/cheatsheets/uniq | 12 ++++++++++++ 1 file changed, 12 insertions(+) create mode 100644 cheat/cheatsheets/uniq 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