MPE/iX Shell and Utilities Reference Manual, Vol 1

diffb(1) MPE/iX Shell and Utilities diffb(1)
NAME
diffb — compare binary files and show differences
SYNOPSIS
diffb [–n][–C n][–c[n]] file1 file2
DESCRIPTION
The diffb utility indicates which bytes differ in the binary files file1 and file2. Output con-
sists of descriptions of the changes in a style reminiscent of the ed text editor. Each descrip-
tion is headed by a line showing the type of change being performed. This line contains three
pieces of information:
the location of the range of bytes in file1 affected by the change, represented as an offset
from the beginning of the file;
the type of change, which is one of a (append), d (delete), and c (change);
the location of the range of bytes in file2 affected by the change.
After the line giving the type of change, the deleted or added bytes are displayed. Non-print-
able bytes are represented by an escape sequence consisting of a backslash character (\), fol-
lowed by the
ASCII
representation of the byte displayed as a three-digit octal number.
The output of diffb resembles the output of diff(1), except that differences are ranges of
bytes rather than ranges of lines. Each displayed set of bytes from file1 is prefixed by <, and a
< appears at the start of each new line in a set of bytes (that is, after each newline character).
Similarly, each group of bytes from file2 is prefixed by >, and a > appears at the start of each
new line in a set of bytes. If bytes from both file1 and file2 are being displayed, a line consist-
ing of --- separates the two sets of bytes.
Options
diffb accepts the following options:
–C n This is equivalent to -c n.
–c[n] With each difference, n bytes of context before and after each change are shown.
The default value for n is 3.
–n The differences are displayed in a form that is usable by
RCS.
Commands and Utilities 1-185