CSVに空の列を挿入したい!

1 min read読了の目安(約200字

awkでCSVに空の列を挿入します

example.csv

1,tokyo,100,200,300
2,saitama,100,200,300
3,kanagawa,100,200,300
4,chiba,100,200,300
5,ibaraki,100,200,300

command

3列目と4列目の間に、空の列を入れて、別ファイルとして書き出す

cat example.csv | awk -F"," {print $1 "," $2 "," $3 "," "," $4 "," $5} > test.csv