mirror of
https://github.com/Erreur32/cheat.git
synced 2025-01-03 11:32:17 +01: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
1 changed files with 13 additions and 0 deletions
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…
Reference in a new issue