Skip to main content

11.6) Examples


For more examples and information on diff please look at http://en.wikipedia.org/wiki/Diff. I would encourage you to play with deleting or changing bits of the data in the files and then understand what diff suggests to get the files to agree. Make a backup of ‘file1’ though before you change it too much. The link above showed just how different files can be and yet diff will find the similar parts. Diff is often used to determine if outputs are the same or different rather than trying to fix them to be the same. If you have a series of input files and you have just run one and you want to compare it to one run previously then diff allows you to identify differences quickly.