I wanted to format the Unix files conditionally, I am currently working on
diff command and wanted to know if it is possible to format the text of the
diff command output.
Matched values should be displayed in green.
Unmatched values should be displayed in red.
Suppose I have two files
file2 and my command is
diff file1 file2.
Now I wanted that suppose output contain 5 mismatch then those mismatch should be displayed in Red color. How to achieve this using unix?
In short "Change color to red for the output of diff command for values which mismatch"