3 cfa37a7b 2004-04-10 devnull cmp \- compare two files
4 cfa37a7b 2004-04-10 devnull .SH SYNOPSIS
9 cfa37a7b 2004-04-10 devnull .I file1 file2
11 cfa37a7b 2004-04-10 devnull .I offset1
13 cfa37a7b 2004-04-10 devnull .I offset2
16 cfa37a7b 2004-04-10 devnull .SH DESCRIPTION
17 cfa37a7b 2004-04-10 devnull The two files are
18 cfa37a7b 2004-04-10 devnull compared.
19 cfa37a7b 2004-04-10 devnull A diagnostic results if the contents differ, otherwise
20 cfa37a7b 2004-04-10 devnull there is no output.
22 cfa37a7b 2004-04-10 devnull The options are:
25 cfa37a7b 2004-04-10 devnull Print the byte number (decimal) and the
26 cfa37a7b 2004-04-10 devnull differing bytes (hexadecimal) for each difference.
29 cfa37a7b 2004-04-10 devnull Print nothing for differing files,
30 cfa37a7b 2004-04-10 devnull but set the exit status.
33 cfa37a7b 2004-04-10 devnull Print the line number of the first differing byte.
35 cfa37a7b 2004-04-10 devnull If offsets are given,
36 cfa37a7b 2004-04-10 devnull comparison starts at the designated byte position
37 cfa37a7b 2004-04-10 devnull of the corresponding file.
38 cfa37a7b 2004-04-10 devnull Offsets that begin with
40 cfa37a7b 2004-04-10 devnull are hexadecimal;
43 cfa37a7b 2004-04-10 devnull octal; with anything else, decimal.
44 cfa37a7b 2004-04-10 devnull .SH SOURCE
45 c3674de4 2005-01-11 devnull .B \*9/src/cmd/cmp.c
46 cfa37a7b 2004-04-10 devnull .SH "SEE ALSO"
47 cfa37a7b 2004-04-10 devnull .IR diff (1)
48 cfa37a7b 2004-04-10 devnull .SH DIAGNOSTICS
49 cfa37a7b 2004-04-10 devnull If a file is inaccessible or missing, the exit status is
50 cfa37a7b 2004-04-10 devnull .LR open .
51 cfa37a7b 2004-04-10 devnull If the files are the same, the exit status is empty (true).
52 cfa37a7b 2004-04-10 devnull If they are the same except that one is longer than the other, the exit status is
53 cfa37a7b 2004-04-10 devnull .LR EOF .
54 cfa37a7b 2004-04-10 devnull Otherwise
56 cfa37a7b 2004-04-10 devnull reports the position of the first disagreeing byte and the exit status is
57 cfa37a7b 2004-04-10 devnull .LR differ .