請問各位在unix有什麼比較好的方法用shell script可以比較兩個檔案中第其中一欄位的值.兩個檔案會
1:每行所含的資料順序不一定一樣,有資料在檔案A出現在檔案B不一定出現
2:想比較第三欄(yes, no,empty)的值
如
File A:
$cat A.log
case1,0.0001,yes
case2,0.0021,no
case3,0.0041,no
case4,0.0041,empty
case5,0.0101,empty
case6,0.0501,yes
File B:
$cat A.log
case1,0.0001,yes
case7,0.0021,yes
case2,0.0041,yes
case3,0.0041,empty
希望output:
case2 no yes:case3 no empty:case4 empty " ":case5 empty " ":case6 yes " ":case7 " " yes.