For regular files I can use the comm
command to find common lines.
For example we have two files
$ cat f1
line1
line2
line3
line4
line5
$ cat f2
line1
line20
line30
line4
line5
Its compared like:
$ comm -12 f1 f2
line1
line4
line5
How to find the offset of matching lines and also how to do comparison for two binary files and print matching line offset?
I've been using things like diff
, cmp
, comm
for past 1hr, unable to figure this out.
EDIT 1: Not exact solution but found vbindiff it helps a bit.