3 ms·
The simple case is: FS = "," or: awk -F ',' <program> If you're working with CSV data that has quoted strings with embedded commas, FPAT is your fri
by dredmorbius 7y ago
The simple case is:
FS = ","
or:
awk -F ',' <program>
If you're working with CSV data that has quoted strings with embedded commas, FPAT is your friend:
FPAT = "([^,]+)|(\"[^\"]+\")"
See: https://www.gnu.org/software/gawk/manual/gawk.html#Splitting-By-Content https://www.gnu.org/software/gawk/manual/gawk.html#Splitting...
- doctor_eval 7y agojust want to say thanks for this, I haven't had to deal with CSV for years and now only a week after you posted this I needed it. brew install gawk good to go :)