1 02/07/85 compare
2
3 Syntax as a command:
4 compare path1|offset1 path2|offset2 -control_args
5
6
7 Syntax as an active function:
8 compare path1|offset1 path2|offset2 -control_args
9
10
11 Function: compares two files segments multisegment files or archive
12 components and lists their differences. The comparison is a
13 word-by-word check and can be made with a mask so that only specified
14 parts of each word are compared. The active function returns true if
15 the compared portions are identical, false otherwise.
16
17
18 Arguments:
19 path1, path2
20 are the pathnames of the files to be compared. The equal convention
21 is allowed for path2. Either can be an archive component pathname.
22 offset1, offset2
23 are octal offsets within the files if they are segments or archive
24 components. If you omit them, the entire contents are compared.
25 The comparison begins at the word specified or at the first word of
26 the segment if you specify no offset.
27
28
29 Control arguments:
30 -brief, -bf
31 prints only the first and last words of each block of discrepancies
32 that is four or more words in length see "Notes".
33 -inhibit_error, -ihe
34 causes the active function to return "false" rather than produce an
35 error if one of the files to be compared does not exist. An error
36 still occurs if neither file exists.
37 -length N, -ln N
38 makes the comparison continue for no more than N octal words.
39 -long, -lg
40 prints all discrepancy words see "Notes". Default
41 -mask N
42 uses the octal mask N in the comparison. If N is less than 12 octal
43 digits, it is padded on the left with zeros.
44
45
46 -no_inhibit_error, -nihe
47 suppresses the effect of -inhibit_error.
48 -short, -sh
49 prints a single line for each block of discrepancies:
50 120 words at: 1631
51 1100 words at: 33404
52 See "Notes."
53 -totals, -tt
54 prints a single line for the entire comparison:
55 17 differences, 3140 words total.
56
57
58 Notes: The maximum number of words to be compared is the word count of
59 the first segment minus its offset or the word count of the second
60 segment minus its offset, whichever is greater. If you supply -length,
61 comparison stops after the specified number of words. If the segments
62 are of unequal length, the remaining words of the longer segment are
63 printed as discrepancies. The word count of a segment is computed by
64 dividing the bit count plus 35 by 36. If the word count minus the
65 offset is less than zero, an error message is printed and the command
66 is aborted. Any discrepancies found by the command are listed in the
67 following format:
68 offset contents offset contents
69 4 404000000002 4 000777000023
70 6 404000000023 6 677774300100
71
72
73 To compare segments containing only ASCII character string data, use
74 the compare_ascii command.
75
76 Multisegment files MSFs are compared component by component, with
77 headers of the form "Component <n>:". Excess components of the longer
78 MSF are listed, the same as for excess words in a longer segment. When
79 a segment is compared to an MSF, a header of the form
80 "Segment/component 0:" or "Component 0/segment:" is printed at the
81 beginning.
82
83 You can't use -brief, -long, and -short in the active function.