Given 2 files which have the same number of lines, is it possible the get a diff with ONLY change (c
), in other words, WITHOUT additions (a
) and deletions (d
)?
For example, here are 2 files with 10 lines each.
file1.txt:
apple
apple
pear
grape
pear
grape
pear
pear
pear
apple
file2.txt:
apple
apple
pear
pear
pear
pear
pear
pear
pear
apple
Calling diff file1.txt file2.txt
would produce:
4d3
< grape
6c5,6
< grape
---
> pear
> pear
Is it possible to get a result like:
4c4
< grape
---
> pear
6c6
< grape
---
> pear