Assume you have a CSV comma delimited file with fields enclosed in quotes and one of the quoted data field(s) contains a comma. How do you count the number of fields in that record?
Here is the example:
$ echo '"abc”,”123”,,”abc,123”' | awk -F ',' '{print NF}'
5
The result is 5, but it should be 4. Using the example above, how do I modify the syntax to count the number of fields?