Linux COMM Command

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.

Syntax

$comm [options] [file_name1] [file_name2]

Opetions

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.

Share Share on Facebook Share on Twitter Share on Google+ Share on LinkedIn Pin on Pinterest Share on Stumbleupon Share on Tumblr Share on Reddit Share on Diggit