[フレーム]
Last Updated: February 25, 2016
·
4.464K
· datasaur

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

AltStyle によって変換されたページ (->オリジナル) /