I have issues with reading csv format like this:
"foo","bar foo, foo bar", foo, bar, far
"bar", "foobar foo, foo" , bar, fobar, bar
Technically, both lines should have 5 fields accordingly with separator ,
.
awk -F, '{print NF}' resolver.csv
6
6
This is where problem goes. AWK treats ,
as a separator between quotations marks, and provide non accurate results. Giving the separator like -F '","'
makes things only worse.
awk -F, '{print $3}' test.csv
foo bar"
foo"
Any work around?
csvtool
from Debian repo's, and seems it is doing the job properly.. – fugitive Jul 25 '17 at 13:48