4 ms·
awk -F'", "' That's apostrophe, quote, comma, space, end quote, apostrophe.
by ferrari8608 11y ago
awk -F'", "'
That's apostrophe, quote, comma, space, end quote, apostrophe.
- Rotten194 11y agoWhat if not all columns are quoted? A lot of the time only the columns that need quoting are quoted and the others are bare.
- z92 11y agoNice solution. Will not work were numeric fields are not quoted. But nice solution, nevertheless.
- Rangi42 11y agoWhich still fails if the values contain escaped quotes: Name, Age, Address "James aka ""Jim"", ""licensed"" attorney", 42, "New York" That's three values: James aka "Jim", "licensed" attorney 42 New York And there are other possible irregularities: zero or N spaces after the comma separators; unquoted values when they're not needed; backslash-escaped special characters; escaping newlines.