3 ms·
"awk manipulates an ad hoc database stored as text, e.g. CSV files." I love awk and use it on a daily basis, but it's biggest weakness is CSV files, since data
by aidenn0 15y ago
"awk manipulates an ad hoc database stored as text, e.g. CSV files."
I love awk and use it on a daily basis, but it's biggest weakness is CSV files, since data so often contains commas. Please don't use CSV as an example of what awk is good at!
[edit]
Easiest workaround if you do need to do something quickly with a CSV is to just use sed to replace unquoted commas with a string not in your data; for non throwaway uses, there is a CSV library for awk.
- bingaling 15y agoCsvkit may be useful: http://news.ycombinator.com/item?id=3477771 http://news.ycombinator.com/item?id=3477771
- dredmorbius 15y agoAlso csvtool (just went hunting for it after seeing your post). https://forge.ocamlcore.org/projects/csv/ https://forge.ocamlcore.org/projects/csv/
- brendano 15y agoYes! -- translation into a strictly delimited format is key.