将不同的csv组合到单个xls中

时间:2013-04-08 08:04:24

标签: shell unix

我希望通过在shell脚本中组合三个或更多xls来形成一个xls,如下例所示我有A.csv,B.csv和C.csv,我希望所有三个都在单个xls中。

File name:,A.csv,,,,,,
Load summary:,,,,,,,
,"(A)
Records received in CIF file","(B)
Records loaded in CIF table (temp_card)","(C)
Cramer count (Card)","(A - B)
Records failed to load into CIF","(B - C)
Records failed to load into Cramer",Cramer Load Success %,Overall Load Success %
,14606,14606,14606,0,0,100,100



File name:,B.csv,,,,,,
Load summary:,,,,,,,
,"(A)
Records received in CIF file","(B)
Records loaded in CIF table (temp_card)","(C)
Cramer count (Card)","(A - B)
Records failed to load into CIF","(B - C)
Records failed to load into Cramer",Cramer Load Success %,Overall Load Success %
,14606,14606,14606,0,0,100,100


File name:,C.csv,,,,,,
Load summary:,,,,,,,
,"(A)
Records received in CIF file","(B)
Records loaded in CIF table (temp_card)","(C)
Cramer count (Card)","(A - B)
Records failed to load into CIF","(B - C)
Records failed to load into Cramer",Cramer Load Success %,Overall Load Success %
,14606,14606,14606,0,0,100,100

我怎么能这样做..

1 个答案:

答案 0 :(得分:0)

简单的事情:

#!/bin/bash
cat A.csv B.csv c.csv > ABC.xls

应该这样做。如果你期待别的东西,请在QS中提及。