如何并排绘制 unix diff 命令的结果,而不是一个接一个地绘制差异?请参阅下面的示例:
diff /tmp/test1 /tmp/test2
1,4c1,2
< asfdsadf
< asdfsad
< fsaf
< fdsadf
---
> asdfsafdsf
> saf
6,8d3
< sadf
< asdf
< sadf
10d4
< fasd
12,13c6,14
< sadfa
< fd
---
> sadf
> sadf
> sadf
> sadf
> sadf
> sadf
> sadf
> sadf
> safa
我想要类似的东西:
diff /tmp/test1 /tmp/test2
1,4c1,2
< asfdsadf > asdfsafdsf
< asdfsad > saf
< fsaf
< fdsadf
---
6,8d3
< sadf
< asdf
< sadf
10d4
< fasd
12,13c6,14
< sadfa > sadf
< fd > sadf
--- > sadf
> sadf
> sadf
> sadf
> sadf
> sadf
> safa