comm command in Linux with examples
comm compare two sorted files line by line and write to standard output; the lines that are common and the lines that are unique.
Suppose you have two lists of people and you are asked to find out the names available in one and not in the other, or even those common to both. comm is the command that will help you to achieve this. It requires two sorted files which it compares line by line.
Before discussing anything further first let’s check out the syntax of comm command: