Where mergefilename is the name you chose when saving the merged file in Filemerge and newmergefilename is your chosen name for the final, merged file with the original end of line characters, ready to view in your Classic application. Where filename is the name of your first file and tempfilename is a name of your choice for the converted file.ĭo the same thing again for the second file, then run FileMerge (it's in Developer/Applications if you have installed Developer Tools), choosing your two temporary files to compare.Īfter merging the files, replace the original end of line characters: It's not really worth a shell script just go to the terminal and navigate to the directory in which your files are saved, then enter: If you have files like that, you need to use tr to convert the end of line characters before you can run Filemerge on them. However, I found that it crashes if you use it on files with Mac end of line characters - I needed to compare two database files produced by Gene, a family history application which I have to run in Classic.
# Remove the temporary files when exiting (via Ctrl+C or normal exit or kill etc.)įilemerge is indeed better than diff because it displays a nice side by side comparison of the two files with a visual display of the differences, and then allows you to merge the files if you want. # We create temporary files ufile1 & ufile2 with r changed to n # pass on arguments to diff except for h (print help) Printf 'Usage: %s file1 file2' `basename $0` # So people don't make weird versions of printf, diff, rm etc. # that use the traditional Macintosh line ending: r UltraCompare gives you the ability to rapidly compare 2 or 3 files from multiple locations at once, and merge conflicts and differences visually. # Provides the equivalent of 'diff' for comparing files Powerful 2-way or 3-way file compare and folder compare, folder sync, Excel file compare, and a lot more. Here's my version (using bourne shell programming of course) that's even more fancy. Go and look at for why you shouldn't be using csh for scripting.