Skip to content

comm


NAME
     comm - select or reject lines common to two sorted files

SYNOPSIS
     comm [-123] file1 file2

DESCRIPTION
     Read two sorted files and print three columns: the lines only in the
     first, the lines only in the second, and the lines in both.

     Both files must be sorted or the answer is nonsense. sort(1) first.

OPTIONS
     -1  Leave out the lines only in file1
     -2  Leave out the lines only in file2
     -3  Leave out the lines in both

EXAMPLES
     comm -12 yesterday today    Only what is in both
     comm -23 yesterday today    Only what has gone away

SEE ALSO
     sort(1), uniq(1), join(1), diff(1)