Let's say I get the diff output of comparing 2 files:
example example example example example example example example and
example example# example example example example# example# example So basically, the only difference I made to the original file was adding #-marks to some of the lines. For these 2 files, the diff output would be:
... example +example# example example -example -example -example +example# +example# example ... So the diff command basically thinks that the first #-mark that I put on the second line is a completely new line in the file. Is there any way to make the diff output the changes like this:
... example -example +example# example example -example -example +example# +example# example ... This would make my life easier. Thanks!
#marks to your file. But there's no way to know if that's what you did. Maybe you literally added a lineexample#, deleted a few linesexample, and added othersexample#. Or maybe you did a combination of adding and subtracting lines, and modifying lines. There is no objective truth here to be found, other than the start and end states.