Re:GoAWK: an AWK interpreter written in Go
by benhoyt on Saturday August 18, 2018 @09:56AM
(#17788471)
Interesting point. I've though that AWK should have a mode where it does proper quote parsing of CSV files. Maybe I'll add a -csv option for that (or just have it do it automatically when the FS is ',' -- though that wouldn't be backwards compatible).
[ Parent
| on HN ]
Re:GoAWK: an AWK interpreter written in Go
by vram22 on Saturday August 18, 2018 @03:04PM
(#17790037)
You probably know it already, but in case not, the CSV format is not fully standardized, and so there are variations. So you might have to handle those to provide better support of the feature, if you implement it.
https://en.wikipedia.org/wiki/Comma-separated_values
For example, csv.reader in Python's csv module in the stdlib, has a dialect argument, due to this.
Re:GoAWK: an AWK interpreter written in Go
by jrumbut on Saturday August 18, 2018 @11:12PM
(#17792355)
Perhaps deal with quotes strings generally, and then quoted strings mode with FS=, is CSV mode, and that quoted string functionality is available elsewhere (and maybe also for output).
Less intuitive maybe for beginners but more generally useful?