When comparing two files, how can I get the exact line number of the changed locations?

I need to compare two source files and get the exact line number of the modified statements. I used diff and GNU output in a unified format. However, only the changed fragment (indicated by linear ranges) is displayed on this output. But what I really want is a tool that can directly give me this:

(about new file)

line 5: added;
line 11: modified

(about old file)

line 7: deleted

Is there any tool that can do this? Or is there any option in GNU diff that can do this?

Thank!

+3
source share
1 answer

, meld kdiff3 . , , .

0

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


All Articles