使用Beyond Compare 3或4进行逐行比较(忽略顺序)

nas*_*ras 7 comparison file beyondcompare3

我正在尝试使用Beyond Compare 3或4对文件中的内容进行逐行比较.有一点需要注意.这些行在文件中的顺序不一定相同.以下示例:

例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.
Run Code Online (Sandbox Code Playgroud)

例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
Run Code Online (Sandbox Code Playgroud)

例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
Run Code Online (Sandbox Code Playgroud)

有人可以告诉我,如果使用Beyond Compare可以实现这一目标吗?

小智 19

对于仍然感兴趣的人:

比较文件时,您可以选择文件格式(从工具栏按钮"格式"),只需选择"已排序",您就可以实现这种比较.