6.0;cmf (compare_file), revision 6.0, 86/07/15
CMF (COMPARE_FILE) -- Identify differences among files.
usage: CMF file_a [...file_e] [-R report_file] [-TB] [-BR] [-L] [-M n]
FORMAT
CMF file_a [...file_e] [options]
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. Pathnames may be
derived from 'file_a'.
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 file name is NOT derived, then
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, which must match for CMF to consider the files
synchronized. The default value is 3.
EXAMPLES
Assume that file "file1" contains
Fourscore
and seven
years ago,
our fathers brought
forth
and "file2" contains
Eighty-seven
years ago,
our fathers brought
CMF produces the following output when "file1" is compared to "file2."
$ cmf file1 file2
A1 Fourscore
A2 and seven
changed to
B1 Eighty-seven
A5 forth
deleted before
end of file B
2 discrepancies found.
RELATED TOPICS
More information is available. Type:
- HELP CMSRF
for details about comparing sorted files.
- HELP CMT
for details about comparing directory trees.