linux - Bash - How to skip a column while writing to csv -
linux - Bash - How to skip a column while writing to csv -
in next screenshot can see on first row, there country codes , each country code have 2 different related columns (mt & mo). how skip adding empty column after each country using bash script?
here how write countries row:
echo "'sg',,'id',,'au',,'my',," >> ${filename}
as can see there ,, in between country codes facilitate reading output there way skip adding column end having whole column each country? need this:
please advice,
the csv format not provide way indicate cell spans several columns. in fact, doesn't provide way indicate formatting of kind.
so if restricted using csv, cannot improve inserting empty cell.
linux bash shell csv scripting
Comments
Post a Comment