I'm comparing two files using sdiff to get side by side difference but I want the difference to be color highlighted.
Ex:
File A:
Hello There! General Kenobi!
Magic
File B:
Hello World! Hola
Magic
Now the output from sdiff will be:
Hello There! General Kenobi! | Hello World! Hola
I want the diff highlighted like (couldn't color code so, bold and italics)
Hello There! General Kenobi! | Hello World! Hola
I can't use GUI based or colordiff command etc. I tried using sed and last option is to pipe the sdiff output through a script, but I'm thinking there might be a better way.
csdiff is a small wrapper script to colorize the output of
sdiff
.It works well for colorizing the side-by-side diff, but it doesn't work with
sdiff
's interactive mode (-o
).You can also just use
diff --color=always --side-by-side
for similar results, or icdiff.