25 points · by arm · 5y ago · 4 comments
justA() { comm -23 <(sort -u "$1") <(sort -u "$2"); }
justB() { comm -13 <(sort -u "$1") <(sort -u "$2"); }
bothAB() { comm -12 <(sort -u "$1") <(sort -u "$2"); } vim -d file1 file2
:%!sort | uniq -c
:wincmd l
:%!sort | uniq -c emacs file1 file2
C-x h C-u M-| s o r t | u n i q SPC - c RET
C-x 4 b RET
C-x h C-u M-| M-p RET
Or did I misunderstand what those Vim commands were supposed to do? They did not seem to work on my version of Vim.