$ cmp -b file1 file2
file1 file2 differ: 12 byte, line 2 is 154 l 151 i
in this response what do '154' and '151' refer to?
$ cmp -b file1 file2
file1 file2 differ: 12 byte, line 2 is 154 l 151 i
in this response what do '154' and '151' refer to?
The GNU version of cmp
(which you are using) prints the differing bytes when given the -b
option. If no printable representation of the byte can be shown, cmp
will display
[...] control bytes as a
^
followed by a letter of the alphabet and precede bytes that have the high bit set withM-
(which stands for "meta").
(quote from the cmp
manual on a GNU system).
154 in the output refers to the letter l
, and 151 refers to the letter i
(also visible in the output). These are octal ASCII codes (see man ascii
) for the first bytes in each file that differs between the files.