Linux and UNIX Man Pages

Linux & Unix Commands - Search Man Pages

comm(1) [v7 man page]

COMM(1) 						      General Commands Manual							   COMM(1)

NAME
comm - select or reject lines common to two sorted files SYNOPSIS
comm [ - [ 123 ] ] file1 file2 DESCRIPTION
Comm reads file1 and file2, which should be ordered in ASCII collating sequence, and produces a three column output: lines only in file1; lines only in file2; and lines in both files. The filename `-' means the standard input. Flags 1, 2, or 3 suppress printing of the corresponding column. Thus comm -12 prints only the lines common to the two files; comm -23 prints only lines in the first file but not in the second; comm -123 is a no-op. SEE ALSO
cmp(1), diff(1), uniq(1) COMM(1)

Check Out this Related Man Page

COMM(1) 						    BSD General Commands Manual 						   COMM(1)

NAME
comm -- select or reject lines common to two files SYNOPSIS
comm [-123i] file1 file2 DESCRIPTION
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; and lines in both files. The filename ``-'' means the standard input. The following options are available: -1 Suppress printing of column 1. -2 Suppress printing of column 2. -3 Suppress printing of column 3. -i Case insensitive comparison of lines. 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. DIAGNOSTICS
The comm utility exits 0 on success, and >0 if an error occurs. SEE ALSO
cmp(1), diff(1), sort(1), uniq(1) STANDARDS
The comm utility conforms to IEEE Std 1003.2-1992 (``POSIX.2''). HISTORY
A comm command appeared in Version 4 AT&T UNIX. BSD
June 6, 1993 BSD
Man Page

13 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

FORMAT OF CSV FILE under unix environment.

hi I unload the table results from oracle to csv file foramt. i need increse the width of each column using unix commands could you pl tell me how to increase the width of each column to spefic width uisng sed unix command or na other unix commands i have file name called report.csv inside... (38 Replies)
Discussion started by: raosurya
38 Replies

2. Solaris

Solaris installation

I have downloaded Solaris. But I can't install it on my 64 bit PC. It is fraught with installation problems. I gave it up. I know it will work on SUN Sparc computer. However, it is beyond my budget. Did you install it successfully on an ordinary PC? (49 Replies)
Discussion started by: Angelo
49 Replies

3. UNIX for Dummies Questions & Answers

Need help with -exec cp command.

I have a ksh script that contains the following: find /dir1/dir2 -type f -name "FILE.*" -newer /dir1/dir2/afterme.txt -exec cp /dir1/dir2/dir3 {} \; When I run it from the cli, it runs fine. When I run it from the ksh script I get find: missing argument to `-exec' I also tried -exec cp... (40 Replies)
Discussion started by: bbbngowc
40 Replies

4. Shell Programming and Scripting

Include white spaces while using CUT command

Hi I tried to extract 19 characters (default) enclosed with in tag from a file using cut command. If the characters comprises of double space, the cut command gives the output with a single spacing. file 1 <name>Kumar Rajasekaran</name> cut -c7-26 "file1" the out put i received is ... (48 Replies)
Discussion started by: Sekar1
48 Replies

5. Shell Programming and Scripting

AWK Command

I have a file seperated by pipe(|) operator I want to fetch lines from the file having the word "Task started" in 7th column awk -F"" '{if($7 == "Task started") print $0}' file.txt But this code is not giving any output. Please kindly point out where I went wrong (43 Replies)
Discussion started by: Prachi Gupta
43 Replies

6. Shell Programming and Scripting

Can I speed up my grep command?

I've got at least 30,000 XML files that I'm using the grep command to get their filename. Can I use the head command to grab just the beginning 8 lines and compare that instead of parsing the whole document? It would speed things up! or maybe grep -m? (49 Replies)
Discussion started by: emc^24sho
49 Replies

7. What is on Your Mind?

How Can We Increase the Size of Our Community?

Any suggestions on how to increase the number of posters and contributors? Please vote and write in your suggestions. Thank you! (72 Replies)
Discussion started by: Neo
72 Replies

8. Shell Programming and Scripting

Need help with sed/awk command

Dear all, I have a file named as fileName with following entities, functions { planeDictName { type surfaces; functionObjectLibs ( "libsampling.so" ); outputControl timeStep; surfaceFormat vtk; fields ( p U ); ... (42 Replies)
Discussion started by: linuxUser_
42 Replies

9. Shell Programming and Scripting

Perl command in bash

I have the below perl script that runs (I think): 'C:\Users\cmccabe\Desktop\annovar\matrix.pl' < "${id}".txt.hg19_multianno.txt > "L:\NGS\3_BUSINESS\Matrix\Torrent\matrix_${id}.txt" The problem is I get an error that the ${id}.txt does not exist. I have tried "${id}.txt as well. ... (42 Replies)
Discussion started by: cmccabe
42 Replies

10. Shell Programming and Scripting

Building JSON command with bash script

Hello. I'm new to bash script and I'm learning the basics by writing some scripts. Recently a friend of mine asked me if I could try to write a script to him to automate a couple of processes that uses JSON RPCs. I'll try to explain in few words the workflow just to contextualize the problem.... (48 Replies)
Discussion started by: psysc0rpi0n
48 Replies

11. Open Source

What editor does everyone use?

I was looking through the topics and I wasn't sure if this was the best place to post this question: I was wondering, out of curiosity, which software everyone was using to code their scripts in. I do mostly sh/ksh and my favorite has always been EditPlus because it is small, fast, yet powerful.... (409 Replies)
Discussion started by: yongho
409 Replies

12. Open Source

What is your favorite Linux distro?

What is your favorite Linux distro? and possibly why? Personally, I have Fedora 3 on my computer. I have used Ubuntu and Slackware, too. But I think I liked Ubuntu more, maybe because of its speed and easy installation of packages. (192 Replies)
Discussion started by: milhan
192 Replies

13. UNIX for Advanced & Expert Users

What's your most useful shell?

What's your most useful shell? /bin/sh /bin/csh /bin/ksh /bin/tcsh /bin/bash (249 Replies)
Discussion started by: zylwyz
249 Replies