# *Prerequisites*: The files ahve to be sorted.
# Generally comm creates a three column output with:
#
# 1. column: lines, which appeare _only_ in file1
# 2. column: lines, which appeare _only_ in file2
# 3. column: lines, which appeare in both, in file1 and in file2
#
comm file1 file2
# There are four possible parameters for comm: -1, -2, -3, -z.
# The most importent of those are -1, -2, -3. Be aware, that
# -1 does not select the lines, which are in file 1; in opposite:
#
# -1 means: HIDE the column with the lines, which are only in file1.
# -2 means: HIDE the column with the lines, which are only in file2.
# -3 means: HIDE the column with the lines, which are in both files.
#
# Therefore the following displays only those lines which are in both files.
comm -12 file1 file2
# Show those lines, which are only in file1, and not in file2.
comm -23 file1 file2
# Show those lines which are only in the second file.
comm -13 one two
# Show two columns, first with lines only in file1,
# second with lines only in file2.
comm -3 file1 file2