Using command line to process CSV files (2022)
Unfortunately "awk -F," (field separator of comma) doesn't work with most real CSV files, because of quoted fields, commas in fields, and (less frequently) multiline fields. My GoAWK implementation has a CSV mode activated with "goawk -i csv" (input mode CSV) and some other CSV features that properly handle quoted and multiline fields: <a href="https://benhoyt.com/writings/goawk-csv/" rel="nofollow noreferrer">https://benhoyt.com/writings/goawk-csv/</a><p>The frawk tool (written in Rust) also supports this.<p>Interestingly, Brian Kernighan is currently updating the book "The AWK Programming Language" for a second edition (I'm one of the technical reviewers), and Gawk and awk are adding a "--csv" option for this purpose. So real CSV mode is coming to an AWK near you soon!