comm in Mac OS X

By: Strauss K Emailed: 1643 times Printed: 2119 times    

Latest comments
By: rohit kumar - how this program is work
By: Kirti - Hi..thx for the hadoop in
By: Spijker - I have altered the code a
By: ali mohammed - why we use the java in ne
By: ali mohammed - why we use the java in ne
By: mizhelle - when I exported the data
By: raul - no output as well, i'm ge
By: Rajesh - thanx very much...
By: Suindu De - Suppose we are executing

Compare two sorted files line by line.

Syntax
      comm [-123i] file1 file2

Options
   -1      Suppress printing of column 1

   -2      Suppress printing of column 2

   -3      Suppress printing of column 3

   -i      Case insensitive comparison of lines

The comm utility reads file1 and file2, which should be sorted lexically, and produces three text columns as output:

 Lines only in file1; Lines only in file2; Lines in both files. 

If printing of a column is suppressed, the output will be padded with TAB characters.

Each column will have a number of tab characters prepended to it equal to the number of lower numbered columns that are being printed. For example, if column number two is being suppressed, lines printed in column number one will not have any tabs preceding them, and lines printed in column number three will have one.

The comm utility assumes that the files are lexically sorted; all characters participate in line comparisons. The filename '-' means standard input. 
Collation sorting: the LANG, LC_ALL, LC_COLLATE, and LC_CTYPE environment variables affect the execution of comm


macos Home | All macos Tutorials | Latest macos Tutorials

Sponsored Links

If this tutorial doesn't answer your question, or you have a specific question, just ask an expert here. Post your question to get a direct answer.



Bookmark and Share

Comments(0)


Be the first one to add a comment

Your name (required):


Your email(required, will not be shown to the public):


Your sites URL (optional):


Your comments:



More Tutorials by Strauss K
cut in Mac OS X
curl in Mac OS X
crontab in Mac OS X
cron in Mac OS X
cp in Mac OS X
continue in Mac OS X
complete in Mac OS X
command in Mac OS X
comm in Mac OS X
cmp in Mac OS X
cksum in Mac OS X
chroot in Mac OS X
chown in Mac OS X
chmod in Mac OS X
chgrp in Mac OS X

More Tutorials in macos
Getting PHP running on Mac OS 10.1
Installing gedit for python programming in Mac OS X
What is Mac OS X?
History of Mac OS X
Major features of Mac OS X
Different Versions of Mac OS X
What is new in Mac OS X Snow Leopard
alias, unalias in Mac OS X
apropos in Mac OS X
awk in Mac OS X
basename in Mac OS X
bash in Mac OS X
bg in Mac OS X
bless in Mac OS X
break in Mac OS X

More Latest News
Most Viewed Articles (in macos )
Installing gedit for python programming in Mac OS X
alias, unalias in Mac OS X
awk in Mac OS X
bless in Mac OS X
break in Mac OS X
cal, ncal in Mac OS X
comm in Mac OS X
What is Mac OS X?
History of Mac OS X
Major features of Mac OS X
Different Versions of Mac OS X
What is new in Mac OS X Snow Leopard
apropos in Mac OS X
basename in Mac OS X
bash in Mac OS X
Most Emailed Articles (in macos)
Installing gedit for python programming in Mac OS X
basename in Mac OS X
What is new in Mac OS X Snow Leopard
apropos in Mac OS X
cp in Mac OS X
cut in Mac OS X
awk in Mac OS X
bash in Mac OS X
cd in Mac OS X
cksum in Mac OS X
complete in Mac OS X
curl in Mac OS X
History of Mac OS X
bg in Mac OS X
bless in Mac OS X