the comm command compares the lines that are common between filename1 and filename2,this command gives you the output in three portions including lines unique to filename1,lines unique to filename2 and common lines from both the file.
$comm [options] [file_name1] [file_name2]
Sr.No |
Options |
Descriptions |
---|---|---|
01 |
-1 |
for skipping the output of filename1 |
02 |
-2 |
for skipping the output of filename2 |
03 |
-3 |
for skipping common part from both the file. |
Example
$comm file1.txt file2.txt
it will show the contents of file1.txt,file2.txt and common contents of both the files.