The command comm is more difficult that you might think

Have you ever used the command comm? It's a Linux command used to compare two (sorted) files. Comm produces three columns of output:
1: Lines only in file 1.
2: Lines only in file 2.
3: Lines in bothe files.

You can surpress columns by using options like "-1", "-2", "-12" and so on.

Imagine file 1 contains:

$ cat file1
A
B
C

And file 2 contains:

$ cat file2
A
C
D

Than these options (left) would produce this output (right):

Option output explanation
-1 ACD Show lines only in file 2 and in both files
-2 ABC Show lines only in file 1 and in both files
-3 BD Show lines in file 1 and in file 2, but not in both files
-12 AC Show lines in both files
-13 D Show lines only in file 2
-23 B Show lines only in file 1
-123 (no output) Surppress all columns