10.0;cmsrf (compare_sorted_file), revision 1.0, 88/01/21
cmsrf (compare_sorted_file) -- Find lines common to two files.
usage: cmsrf [-1] [-2] [-3] [-12] [-13] [-23] [-123] file1 [file2]
DESCRIPTION
cmsrf reads sorted files, file1 and file2, and produces 1-, 2-, or 3-
column output. Column 1 contains lines found only in file1, column 2
contains lines found only in file2, and column 3 contains lines found in
both files. The number option, -n, specifies which columns to print. Use
cmf (compare_file) to compare unsorted files.
Use of a hyphen for either filename causes the data to be read from
standard input.
If no options are specified, cmsrf produces a complete 3-column report.
ARGUMENTS
Use of a hyphen for either filename causes the data to be read from
standard input.
file1 (required)
Specify first file for comparison.
file2 (optional)
Specify second file for comparison.
Default if omitted: compare file1 to standard input
OPTIONS
If no options are specified, cmsrf produces a complete 3-column report.
-n Specify number(s), where n is an integer sequence representing the
following:
1 Report only lines exclusive to file1.
2 Report only lines exclusive to file2.
3 Report only lines common to both files.
EXAMPLES
Compare //us/sorted_stuff.c to standard input and report lines found in
either place, but not both.
$ cmsrf -12 //us/sorted_stuff.c
Report only common lines for both files.
$ cmsrf -3 //us/sorted_stuff.a //us/sorted_stuff.b
SEE ALSO
More information is available. Type
help cmf For details about comparing unsorted files
help cmt For details about comparing directory trees