It would be great if there was a command line interface to stack up the following tkdiff commands:
1) select File->Write Report...
2) select Left Side and Right Side
3) select an output filename
4) do a "Save", or run the report
This would allow the user to script the creation of a tkdiff Report File, which could then be post-processed to perform a higher-level diff.
OK, I'll bite - what higher level did you have in mind ?
For that matter, the content of the report as it stands presently is not much beyond what is called a "side-by-side" diff - which one can already get from the command line by invoking the sdiff command - so why put TkDiff in the middle ?
Thanks for biting! I've never seen sdiff before. It looks like it gives me almost everything I was looking for. Here's what I meant by a "higher level diff" function: I have an expected set of (non-trivial) miscompares between two files, and I want to filter these out so that I only flag the "real" miscompares between the two files. If "diff" is my only alternative, it doesn't give me the nice side-by-side ability to compare that tkdiff (or sdiff) does. I do see that tkdiff reports include a line number and an exclamation point to mark a difference between each side, which sdiff doesn't give me. I don't see an option in sdiff to provide a line number. I'm using a (Perl) script to process the differences between each side, and ignore the miscompares I don't care about. For my application every line miscompares, so I think sdiff is as good as a tkdiff report. Thanks again.
There may be a few other ways to look at it as well-
You might be able to make use of the "-I" sdiff option (ignores lines matching a provided regular expression) ... just be aware that if they "pack into" adjacent lines that ALSO have (legitimate) differences then the "ignore" doesn't happen. Nevertheless, you could also consider a pipeline of commands to first edit out your known discrepancies (maybe via a command called grep), and then sdiff the results, which should eliminate the "packing" issue just described; or just use the regular expression power of Perl itself. Lastly, GNU Diff (if thats your Diff engine) has a dizzying number of options for controlling almost all aspects of what the ouput will look like (including requesting side-by-side and even line numbered output). Exploring those might also provide a solution to your task.
Anyway, it sounds like you have a very specific data condition to address, and while I appreciate your thinking of us, it sounds just a little too data case dependant to warrant a redesign of our command line. We are, fundamentally, an interactive tool. Thus I am closing this request as "wont fix". Best of Luck.
Thanks. I think it's fine to close the item. I do use grep a lot, but the easiest way for me to handle the (complex) checks to filter out the set of miscompares is via a (non-trivial) script. The sdiff output will work fine as an input into this script.