Compare command line tool for mac

I am looking for a command line tool to make the difference between two HTML files. I have analyzed the kdiff3 / bbedit command line, but my problem is not to open any GUI. I want to write a java program to call diff command-line options to compare html files and save the result in another file or, possibly, in a report file. Any pointers will be very helpful.

Thanks Vishal

+4
source share
2 answers

If you have xcode installed, you can call opendiff , which is a (graphical) command line comparison tool. From it the man page :

 opendiff file1 file2 [-ancestor ancestorFile] [-merge mergeFile] opendiff dir1 dir2 [-ancestor ancestorDirectory] [-merge mergeDirectory] 
+9
source

I thought the Mac has a built in diff. Have you tried using diff from mac terminal?

0
source

All Articles