Hello Members,
I have a csv file in the format below. Need help with awk statement to break nth column into 3 separate columns and export the changes to new file.
input file --> file.csv
cat file.csv|less
"product/fruit/mango","location/asia/india","type/alphonso"
need output in following format ,the nth column to modify here is 2nd column
cat file.csv|less
"product/fruit/mango","location","asia","india","type/alphonso"
any help is greatly appreciated.
thanks in advance
awk-novice
how about below..
awk -F"," '{gsub("/","\",\"",$2);OFS=","}1' filename
1 Like
will keep in mind about code tags..
thanks
---------- Post updated at 02:33 PM ---------- Previous update was at 02:28 PM ----------
this thing is working...
thanks a ton....