我有两个文本文件,它们的数据如下所示:
Mon-000101,100.27242,9.608597,11.082,10.034,0.39,I,0.39,I,31.1,31.1,,double with 1355,,,,,,,,
Mon-000171,100.2923,9.52286,14.834,14.385,0.45,I,0.45,I,33.7,33.7,,,,,,,,,,
Mon-000174,100.27621,9.563802,11.605,10.134,0.95,I,1.29,I,30.8,30.8,,,,,,,,,,
我想根据Mon-000101
(作为一个 ID 的示例)字符比较这两个文件,以查看它们的不同之处。我尝试了一些diff
在另一个问题中找到的命令,但没有奏效。我没有想法,所以我求助于比我更有经验的人。
谢谢。
HazMatt:Desktop m$ diff NGC2264_classI_h7_notes.csv /Users/m/Downloads/allfitclassesI.txt
1c1
Mon-000399,100.25794,9.877631,12.732,12.579,0.94,I,-1.13,I,9.8,9.8,,"10,000dn vs 600dn brighter source at 6 to 12"" Mon-000402,100.27347,9.59Mon-146053,100.23425,9.571719,12.765,11.39,1.11,I,1.04,I,16.8,16.8,,"double 3"" confused with 411, appears brighter",,,,,,,,
\ No newline at end of file
---
Mon-146599 Mon-146599 4.54 I 4.54 III
\ No newline at end of file
这是我的尝试和输出。问题是,我知道文件相差 11 行……对应于 11 个不匹配的值。我不想手动执行此操作(谁会?)。也许我误读了差异输出。但我期望的远不止这些。