10.0;cmf (compare_file), revision 1.0, 88/01/21
cmf (compare_file) -- Identify differences among files.
usage: cmf file_a [...file_e]
[-r report_file]
[-tb]
[-br]
[-l]
[-m n]
DESCRIPTION
cmf compares the contents of two to five ASCII files and reports the
differences on standard output. This command works only on files: to
compare directory trees, use cmt (compare_tree).
ARGUMENTS
file_a (required)
Specify pathname of original file; all differences are
reported in relation to this file. Wildcarding of this
pathname is permitted to achieve multiple comparisons.
file_b ... file_e (optional)
Specify descendants of file_a. If more than one file is
specified, you may use a hyphen (-) to cause standard
input to be read in place of a pathname.
Default if omitted: read standard input
OPTIONS
-r pathname Report all differences to the specified report file, in
addition to reporting to standard output. This pathname
may be derived from file_a (if file_a is wildcarded) to
produce one report for each comparison. If file_a is
wildcarded and this report filename is not derived, all
reports are concatenated into the single report file.
-tb Include trailing blanks in the comparison. By default,
ignore trailing blanks. -tb also causes cmf to regard the
newline character at the end of the last line in the file
as significant (if it exists).
-br Display only line numbers of lines containing
discrepancies. By default, display both line numbers and
line contents.
-l Display names of files being compared before each
comparison is performed. This is useful when wildcarded
pathnames are specified.
-m n Set the minimum number of lines for a rematch to n. This
is the minimum number of lines, following a reported
difference, that must match for cmf to consider the files
synchronized. The default value is 3.
EXAMPLES
Assume that file1 contains
The large
brown fox jumped
over the fence.
and file2 contains
The large
blue moon
in the
morning sky
was visible
over the fence.
cmf produces the following output when file1 is compared to file2.
$ cmf file1 file2
A2 brown fox jumped
changed to
B2 blue moon
B3 in the
B4 morning sky
B5 was visible
1 discrepancy found
SEE ALSO
More information is available. Type
help cmsrf For details about comparing sorted files
help cmt For details about comparing directory trees