GoAWK, a POSIX-compatible AWK interpreter written in Go, now supports proper CSV and TSV file parsing via a new `-i csv` input mode and `-o csv` output mode. Standard AWK's field separator approach breaks on quoted CSV fields, making real-world CSV processing unreliable. The new mode handles quoted fields correctly, supports named field access via `-H` and `@"fieldname"` syntax, and conforms to RFC 4180. The implementation is ~2000 lines including tests, reuses Go's encoding/csv writer, and achieves read speeds comparable to Go's standard library (~3 seconds for 1GB). Performance benchmarks show GoAWK is faster than Python and frawk for CSV writing, though slower than frawk for reading.

7m read timeFrom benhoyt.com
Post cover image
Table of contents
But why?FeaturesImplementation notesPerformanceConclusion
3 Impressions