Is there a diff utility that allows you to exclude columns?

Posted by user39160 on Super User See other posts from Super User or by user39160
Published on 2011-07-29T18:01:20Z Indexed on 2012/11/03 5:12 UTC
Read the original article Hit count: 479

Filed under:
|

For example, I have a text file, each line is a long string. I want to exclude 2 "segments" of this string, say columns 1-7 and 20-22. So the bottom 2 lines below would be a match:

123456789012345678901234567890 
------------------------------
xxxxxxxAAAAAAAAAAAAxxxBBBBBBBB
yyyyyyyAAAAAAAAAAAAyyyBBBBBBBB

I know WinMerge has a "IgnoreColumns" plugin but I have never go this working. In this example I would rename it IgnoreColumns_1-7, 20-22.dll, select it in the plugins menu, and choose "Pre-Differ." but it has never worked.

I am going to be comparing huge files that I don't want to modify. I'm not opposed to stream editing them in the comparison with sed or something like that, but I would prefer not to modify the actual files. I have not chose to feed sed to diff yet just because I was hoping for for a more visual view of the data.

© Super User or respective owner

Related posts about diff

Related posts about duplicate-files