4

I want to write a shell script that diffs two files, and dump the result into another file.

I find sdiff to be more intuitive than just diff. However, sdiff doesn't print out the line numbers of where the differences are. I also tried vimdiff, which shows me line numbers, but I'm not sure how to dump the results into a file from a shell script.

So far, this is what I am using:

sdiff -s file1 file2

Is there a way to get side-by-side diffs with line numbers?

jh314
  • 27,144
  • 16
  • 62
  • 82
  • The solution is to use diff. The answer is here: http://unix.stackexchange.com/questions/34874/diff-output-line-numbers – Xofo Mar 14 '16 at 20:33

1 Answers1

0

There is a very nice tool for this: meld

To install: sudo apt-get install meld

You can check differences between two or more files, also between directories.

Edouard Thiel
  • 5,878
  • 25
  • 33