Mac OS X,  Mac OS X Server,  Programming

opendiff

There is a little tool in OS X called opendiff. This command can be used to bring up a quick and dirty graphical view of changes in a file. For example, if you run opendiff followed by two file names, you’ll see what’s different in the two files and what’s the same:

opendiff test test1

The result then looks as follows.

Screen Shot 2016-08-26 at 1.03.16 PM

Note that in the above screenshot, a and b are in white lines and the others are grey, as those are consistent in the two files and the c has been removed and replaced with the four lines on the left. In larger files, this is pretty useful as it provides quick insight into what is different between two files, like what changed in a script between two different versions.