Line-by-line comparison (ignoring order) using Beyond Compare 3 or 4

13.3k views Asked by At

I am trying to perform a line-by-line comparison of contents in file using Beyond Compare 3 or 4. There is a caveat. The lines do not necessarily have the same order in the files. Examples below:

Example 1:

File 1 contents:
value1.key=mango
value2.key=pear

File 2 contents:
value2.key=pear
value1.key=mango

This should say "files identical" on comparison.

Example 2:

File 1 contents:
value1.key=mango
value2.key=pear
value3.key=apple

File 2 contents:
value2.key=pear
value3.key=banana
value1.key=mango

This should report only the following in the comparison:
value3.key=apple | value3.key=banana

Example 3:

File 1 contents:
value1.key=mango
value2.key=pear
value3.key=apple

File 2 contents:
value3.key=apple
value1.key=mango

This should report only the following in the comparison:
value2.key=pear

Can someone please tell me if this is achievable using Beyond Compare?

1

There are 1 answers

1
Dima Lechtchinski On BEST ANSWER

For those still interested:

When comparing files you can choose the files format (from the toolbar button "format"), just choose "sorted" and you can achieve this kind of comparison.