I would love some help with a Bash script loop that will show all the differences between two binary files, using just
cmp file1 file2
It only shows the first change I would like to use cmp because it gives a offset an a line number of where each change is but if you think there’s a better command I’m open to it 🙂 thanks
I think
cmp -l file1 file2might do what you want. From the manpage:The output is a table of the offset, the byte value in file1 and the value in file2 for all differing bytes. It looks like this:
So the first difference is at offset 4531, where file1’s
decimaloctal byte value is 66 and file2’s is 63.