Simple quote-comma CSV parsing in Awk
gawk -vFPAT='[^,]*|"[^"]*"' '{print $1,$2,$3}'
Requires GNU awk 4+, but eliminates the need for a specialized CSV library to handle quoted fields that contain delimiters.
http://www.gnu.org/software/gawk/manual/html_node/Splitting-By-Content.html
Credit for pointing me to this approach goes to: http://stackoverflow.com/a/17287068/75386
Written by Matt Keranen
Related protips
Have a fresh tip? Share with Coderwall community!
Post
Post a tip
Best
#Awk
Authors
Sponsored by #native_company# — Learn More
#native_title#
#native_desc#