转换空格分隔的txt文件为csv文件的shell命令
而且空格数并不确定
cat test.txt | sed 's/\t/,/g;s/[[:space:]]//g' >test.csv
PS:有个简洁的方法
cat test.txt | tr "[[:space:]]" "\t" >test.csv
注:cat test.txt | tr "old value" "new value" >test.csv
https://blog.csdn.net/jswangchang/article/details/83030623
mysql -h address -P port -D database -u username -ppassword -e
"select * from tb_name;" | awk '{for(i=1;i<=NF;i++) {if(i<11) printf $i",";else print $i}}' > choushu.csv
http://codingstandards.iteye.com/blog/604541
https://blog.csdn.net/u013547134/article/details/38294215
https://blog.csdn.net/jclian91/article/details/78522629?locationNum=4&fps=1
http://www.cnblogs.com/like1tree/p/9076965.html
http://www.cnblogs.com/junstudys/p/9420545.html