News for hackers. Stuff that matters.
Re:Checking It Twice by herne on Monday September 20, 2021 @05:43PM (#28599389)
I ended up with this in my .bashrc so I didn't have to keep remembering how to use comm each time:

  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"); }
Re:Checking It Twice by seiferteric on Monday September 20, 2021 @08:13PM (#28600639)
Cool, can't believe I didn't know about comm command. I usually like to use sets() for this type of thing with python or ruby it is easy.
Re:Checking It Twice by rstuart4133 on Sunday September 19, 2021 @10:57PM (#28589975)
Or just:

    vim -d file1 file2
    :%!sort | uniq -c
    :wincmd l
    :%!sort | uniq -c
Re:Checking It Twice by teddyh on Monday September 20, 2021 @06:16PM (#28599744)
Emacs:

  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.