Bagaimana cara memplot hasil perintah unix diff sisi-ke-sisi alih-alih satu perbedaan demi satu? Lihat contoh di bawah ini:
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
Saya ingin mendapatkan sesuatu seperti:
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