I've been trying to use awk to compare two files that have pretty much the same data in apart from certain lines where in one file a fields value has changed. I want to print the line from the first file and the changed line from the second file.
At the moment, all I can get it to do is print the line that contains the changed value.
Here's some example data:
As you can see the first field in the first line in file2 has changed and also the last field in last line has changed. So I'm looking for the output to be something like:
file1 old - 111:222:333:444
file2 new - 112:222:333:444
---------------------------
file1 old - 333:444:555:666
file2 new - 333:444:555:667