Comm

From Wikipedia, the free encyclopedia

The correct title of this article is comm. The initial letter is shown capitalized due to technical restrictions.

The comm command in Unix is a utility that is used to compare two files. It shows common lines in one column and differing lines in separate columns for left and right files. This functionally is similar to diff.

One notable difference between comm and diff is that comm will not try to indicate that a line has "changed" between the two files; lines are either shown in the "from file #1", "from file #2", or "in both" columns. This feature can be especially useful if one wishes two lines to be considered different even if they only have subtle differences.

comm also has options to suppress any of the three columns which is useful for a scripting.

[edit] See also


[edit] External links