2019-10-25 shell script 处理 CSV

2019-10-25  本文已影响0人  七点水Plus

https://stackoverflow.com/questions/9506810/add-column-to-end-of-csv-file-using-awk-in-bash-script

vim input.txt

2012-02-29,01:00:00,Manhattan,New York,234
2012-02-29,01:00:00,Manhattan,New York,843
2012-02-29,01:00:00,Manhattan,New York,472
2012-02-29,01:00:00,Manhattan,New York,516

cat input.txt >> input.csv

$ cat input.csv
2012-02-29,01:00:00,Manhattan,New York,234
2012-02-29,01:00:00,Manhattan,New York,843
2012-02-29,01:00:00,Manhattan,New York,472
2012-02-29,01:00:00,Manhattan,New York,516


shell script 处理 CSV 文件(Excel)
https://www.jianshu.com/p/f8c3cb0d822b

save to csv

printf "Host,Data\n" >> test.csv
printf "yuanxion,20191025\n" >> test.csv
printf "xy18,20191026" >> test.csv

上一篇 下一篇

猜你喜欢

热点阅读