这两个文件在比较时显示为不同。
diff d_out.txt D_out.txt
我使用的是Ubuntu(12.10)终端。
d_out.txt的内容如下:
ABCADBACDABCADBACDAB
ABCABCABCABCABCABCAB
CRASH
CRASH
CRASH
ABCDCABADCDBABCDCABA
ABCDBACBDABCDBACBDAB
ABCCABBCAABCCABBCAAB
ABCDDCBAABCDDCBAABCD
CRASH
CRASH
ABCDEEDABCCBEDAADCBE
ABCCAABCCAABCCAABCCA
ABBCCABBCCABBCCABBCC
ABCDEFFABCDEEFABCDDE
AABCDEFFABCDEEFABCDD
ABBCDEFAABCDEFFABCDE
ABBCCDDEDDCCBBABBCCD
CRASH
CRASH
ABCDEFGBADCFEBGDAFCB
ABCDEBADCBEDABCDEBAD
ABCDBADCABCDBADCABCD
ABCDEFGHIABCDEFGHIAB
ABCDEFGHIJABCDEFGHIJ
ABCDEFGHIJKABCDEFGHI
ABCDEFGHIJKLMNOPQRSA
CRASH
AABBCCDCCBBAAEAABBCC
AABBCCDCCBBAAEAABBCC
D_out.txt的内容
ABCADBACDABCADBACDAB
ABCABCABCABCABCABCAB
CRASH
CRASH
CRASH
ABCDCABADCDBABCDCABA
ABCDBACBDABCDBACBDAB
ABCCABBCAABCCABBCAAB
ABCDDCBAABCDDCBAABCD
CRASH
CRASH
ABCDEEDABCCBEDAADCBE
ABCCAABCCAABCCAABCCA
ABBCCABBCCABBCCABBCC
ABCDEFFABCDEEFABCDDE
AABCDEFFABCDEEFABCDD
ABBCDEFAABCDEFFABCDE
ABBCCDDEDDCCBBABBCCD
CRASH
CRASH
ABCDEFGBADCFEBGDAFCB
ABCDEBADCBEDABCDEBAD
ABCDBADCABCDBADCABCD
ABCDEFGHIABCDEFGHIAB
ABCDEFGHIJABCDEFGHIJ
ABCDEFGHIJKABCDEFGHI
ABCDEFGHIJKLMNOPQRSA
CRASH
AABBCCDCCBBAAEAABBCC
AABBCCDCCBBAAEAABBCC
这段文字最初来自于一个用于解决竞赛问题的程序。D_out.txt文件是原始的评测输出,d_out.txt是我编写的解决该问题的程序的输出。我尝试找到小的差异,但没有找到。
diff d_out.txt D_out.txt
的输出结果。 - Dmitry Zagorulkindos2unix
并计算这些更改后的文件的差异? - fgeod -x d_out.txt > d_out.hex
等命令和比较*.hex
文件) - Mats Petersson