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!
source
share