I'm trying to rearrange the columns using the awk command.
Whenever the cell of csv contains commas ex: (Ok, this is an example, thanks). Then awk creates more columns as it sees the commas in the cell. Due to which csv format is getting messed up.
So how can we ignore the delimiter while rearranging the columns in a csv?
command that I'm using is,
awk 'BEGIN {FS=","; OFS=","} {print "$4", "$2", "$3", "$1"}' ols.csv > rearranged.csv