Line numbers side by side diff

I want to write a shell script that distinguishes between two files and uploads the result to another file.

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

So far this is what I use:

 sdiff -s file1 file2 

Is there any way to get side by side diff with line numbers?

+4
source share
1 answer

There is a very good tool for this: meld

To install: sudo apt-get install meld

You can check the differences between two or more files, as well as between directories.

0
source

Source: https://habr.com/ru/post/1491703/


All Articles