COMM(1) General Commands Manual COMM(1)NAME
comm - print lines common to two sorted files
SYNOPSIS
comm [-123] file1 file2
OPTIONS -1 Suppress column 1 (lines present only in file1)
-2 Suppress column 2 (lines present only in file2)
-3 Suppress column 3 (lines present in both files)
EXAMPLES
comm file1 file2 # Print all three columns
comm -12 file1 file2
# Print only lines common to both files
DESCRIPTION
Two sorted files are read and compared. A three column listing is produced. Files only in file1 are in column 1; files only in file2 are
in column 2; files common to both files are in column 3. The file name - means stdin.
SEE ALSO cmp(1), diff(1), sort(1).
COMM(1)
Check Out this Related Man Page
comm(1) User Commands comm(1)NAME
comm - select or reject lines common to two files
SYNOPSIS
comm [-123] file1 file2
DESCRIPTION
The comm utility reads file1 and file2, which must be ordered in the current collating sequence, and produces three text columns as output:
lines only in file1; lines only in file2; and lines in both files.
If the input files were ordered according to the collating sequence of the current locale, the lines written will be in the collating
sequence of the original lines. If not, the results are unspecified.
OPTIONS
The following options are supported:
-1 Suppresses the output column of lines unique to file1.
-2 Suppresses the output column of lines unique to file2.
-3 Suppresses the output column of lines duplicated in file1 and file2.
OPERANDS
The following operands are supported:
file1 A path name of the first file to be compared. If file1 is -, the standard input is used.
file2 A path name of the second file to be compared. If file2 is -, the standard input is used.
USAGE
See largefile(5) for the description of the behavior of comm when encountering files greater than or equal to 2 Gbyte ( 2^31 bytes).
EXAMPLES
Example 1 Printing a list of utilities specified by files
If file1, file2, and file3 each contain a sorted list of utilities, the command
example% comm -23 file1 file2 | comm -23 - file3
prints a list of utilities in file1 not specified by either of the other files. The entry:
example% comm -12 file1 file2 | comm -12 - file3
prints a list of utilities specified by all three files. And the entry:
example% comm -12 file2 file3 | comm -23 -file1
prints a list of utilities specified by both file2 and file3, but not specified in file1.
ENVIRONMENT VARIABLES
See environ(5) for descriptions of the following environment variables that affect the execution of comm: LANG, LC_ALL, LC_COLLATE,
LC_CTYPE, LC_MESSAGES, and NLSPATH.
EXIT STATUS
The following exit values are returned:
0 All input files were successfully output as specified.
>0 An error occurred.
ATTRIBUTES
See attributes(5) for descriptions of the following attributes:
+-----------------------------+-----------------------------+
| ATTRIBUTE TYPE | ATTRIBUTE VALUE |
+-----------------------------+-----------------------------+
|Availability |SUNWesu |
+-----------------------------+-----------------------------+
|CSI |enabled |
+-----------------------------+-----------------------------+
|Interface Stability |Standard |
+-----------------------------+-----------------------------+
SEE ALSO cmp(1), diff(1), sort(1), uniq(1), attributes(5), environ(5), largefile(5), standards(5)SunOS 5.11 3 Mar 2004 comm(1)
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)
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)
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)
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)
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)
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)
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)
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)
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)
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)
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)