Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

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

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?

like image 818
techjourneyman Avatar asked Dec 16 '14 15:12

techjourneyman


People also ask

What is Beyond Compare 4 used for?

Beyond Compare is a utility for comparing files and folders. It can help you find and reconcile differences in source code, folders, images and data, even if your files are contained in zip archive files or on remote services (e.g. FTP sites). It can synchronize your folders, and validate your copies.

How do I compare files in Beyond Compare 4?

BC version 3 or 4 To compare files in the Folder Compare like in the file viewers: In the Folder Compare, select Session | Session Settings and pick the Comparison tab. Enable the Compare contents option and make sure Rules-based comparison is enabled.

What is Beyond Compare 3?

Beyond Compare allows you to quickly and easily compare your files and folders. By using simple, powerful commands you can focus on the differences you're interested in and ignore those you're not. You can then merge the changes, synchronize your files, and generate reports for your records.


1 Answers

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.

like image 131
Dima Lechtchinski Avatar answered Sep 22 '22 21:09

Dima Lechtchinski