rbrayb
rbrayb

Reputation: 46720

Compare tool that can mask differences?

I do a lot of file comparisons (source, logs etc.) and need to mask certain sections e.g. dates / times / line numbers which cause every line to be different.

Beyond Compare allows you to pre-process the files but then you have to write pieces of code to do this.

Is there a GUI type tool that allows you to mask sections of the file via a filter e.g. skip columns 10 - 16, skip data between word x and word y etc.?

Upvotes: 4

Views: 963

Answers (2)

jdigital
jdigital

Reputation: 12276

Check out WinMerge. It has the ability to filter lines based on regular expressions.

Upvotes: 2

soulmerge
soulmerge

Reputation: 75714

I don't know of any GUI tools, but if you're in a unix environment, you can pipe both files through sed or awk

#Example: skip first word
sed 's/^[^[:space:]]*//' yourfile1 >file1.tmp
sed 's/^[^[:space:]]*//' yourfile2 >file2.tmp
diff file1.tmp file2.tmp

Upvotes: 0

Related Questions