[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: How do I get mdiff to produce usable output?



On Sun, 05 Feb 2012 16:49:48 +0000, Camaleón wrote:

> On Sun, 05 Feb 2012 15:12:41 +0000, Hendrik Boom wrote:
> 
>> Accordinng to the man mdiff page, just executing
>> 
>> mdiff abitree wptree
>> 
>> should give me some kind of list of similarities and differences
>> between the files abitree and wptree, much as
>> 
>> diff abitree wptree
>> 
>> does.  But instead I get nothing.  Why don't I just use diff, you ask?
>> Because when I go into production, I'll have a lot more than two files
>> to compare, the situation that mdiff was apparently designed for.
> 
> (...)
> 
> Mmm... I would start by having a deep look at the manual, it seems very
> complete and detailed:
> 
> A word difference finder (and others)
> http://www.gnu.org/software/wdiff/manual/wdiff.html

I've already found that manual, have read it a few tines, but haven't 
figured out how to get the normal output it describes as follows:

Each line in the hunk, after the header, comes from the compared files, 
but is shifted right so the first column (or the first few columns) of 
each line gives information about where the line is coming from. A space 
indicates a line which is common to all files. In case there are only two 
input files, a minus sign indicates a line from the first file and a plus 
sign a line from the second file. Else, a letter from ‘a’ to ‘z’, or more 
than one letter if there are more than 26 files, indicates to which file 
the line pertains. If a line or a block of line pertains to many files 
but not to all of them, the first column holds a vertical bar, and the 
line or block of lines is bracketed between ‘@/’ and ‘@\’ lines, which 
are kind of comments within the hunk. The initial bracket lists all file 
letters that are related to the incoming line.

Now that's just what I would assume us its default output format, and 
it's *just  exactly* what I'd like to see.  But I haven't been able to 
get it.  Presumably there's some kind of option I have to specify to get 
this, but I haven't been able to find it.

-- hendrik


Reply to: