How can I get the unix command diff show only added and deleted lines? If diff can't do it, what tool can?
feedback
|
|
I'm not sure this is possible as it will be hard to differentiate between changed, added and deleted lines. Consider this file:
We edit it so it looks like this:
If we
This is straightforward to generate. But if you ask | |||||
feedback
|
|
Does | |||||||
feedback
|
|
I had the same question. This function was my solution to obtain the maximum change line number (i.e. changes start with the letter '+'). After which I then loop through the diff file again line by line and do not send to the line processor until this triggers the line to process:
Here is the function:
Steve | ||||
|
feedback
|