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
网友评论