I have a CSV with multiple rows some of which look like this
"ABC","Unfortunately, system has failed"," - Error in system"
"DEF","Check the button labelled "WARNING"","Warning in system"
"XYZ","Everything is okay","No errors"
I need to split these lines and extract the columns such as
I run a loop for each of the rows and extract the 2nd column as
awk -F , '{print $2}' $line
where $line
represents each row. However, I end up getting incorrect values. For example, while trying to fetch 1st row 2nd column, using the above command gives me "Unfortunately
and not "Unfortunately, system has failed"
I understand that my strings have both commas and quotes in them which makes it harder to split based on a delimiter. Is there anything else I can try?