Commit | Line | Data |
---|---|---|
362b077f C |
1 | |
2 | ||
3 | ||
4 | CMP(1) UNIX Programmer's Manual CMP(1) | |
5 | ||
6 | ||
7 | ||
8 | N\bNA\bAM\bME\bE | |
9 | cmp - compare two files | |
10 | ||
11 | S\bSY\bYN\bNO\bOP\bPS\bSI\bIS\bS | |
12 | c\bcm\bmp\bp [ -\b-l\bl ] [ -\b-s\bs ] file1 file2 [ skip1 ] [ skip2 ] | |
13 | ||
14 | D\bDE\bES\bSC\bCR\bRI\bIP\bPT\bTI\bIO\bON\bN | |
15 | The two files are compared. (If _\bf_\bi_\bl_\be_\b1 is `-', the standard | |
16 | input is used.) With no options, _\bc_\bm_\bp makes no comment if | |
17 | the files are the same; if they differ, it reports the byte | |
18 | and line number at which the difference occurred, or, that | |
19 | one file is an initial subsequence of the other. _\bS_\bk_\bi_\bp_\b1 and | |
20 | _\bs_\bk_\bi_\bp_\b2 are initial byte offsets into _\bf_\bi_\bl_\be_\b1 and _\bf_\bi_\bl_\be_\b2 respec- | |
21 | tively, and may be either octal or decimal; a leading ``0'' | |
22 | denotes octal. | |
23 | ||
24 | Options: | |
25 | ||
26 | -\b-s\bs Print nothing for differing files; set exit codes | |
27 | only. | |
28 | ||
29 | -\b-l\bl Print the byte number (in decimal) and the differing | |
30 | bytes (in octal) for all differences between the two | |
31 | files. | |
32 | ||
33 | S\bSE\bEE\bE A\bAL\bLS\bSO\bO | |
34 | diff(1), comm(1) | |
35 | ||
36 | D\bDI\bIA\bAG\bGN\bNO\bOS\bST\bTI\bIC\bCS\bS | |
37 | Exit code 0 is returned for identical files, 1 for different | |
38 | files, and 2 for an inaccessible or missing argument, or a | |
39 | system error. | |
40 | ||
41 | ||
42 | ||
43 | ||
44 | ||
45 | ||
46 | ||
47 | ||
48 | ||
49 | ||
50 | ||
51 | ||
52 | ||
53 | ||
54 | ||
55 | ||
56 | ||
57 | ||
58 | ||
59 | ||
60 | ||
61 | ||
62 | ||
63 | Printed 7/9/88 November 18, 1987 1 | |
64 | ||
65 | ||
66 |