I have a really weird fileformat here, which uses tabs and spaces in any amount to seperate fields (even trailing and leading ones). Another speciality is, that fields can be added with spaces in them, which are then escaped in a CSV manner.
One example:
0 "some string" 234 23947 123 ""some escaped"string""
I try to parse such columns with awk and i would need to have every item in an array, e.g.
foo[0] -> 0
foo[1] -> "some string"
foo[2] -> 234
foo[3] -> 23947
foo[4] -> 123
foo[5] -> ""some escaped"string""
Is this even possible? I read http://web.archive.org/web/20120531065332/http://backreference.org/2010/04/17/csv-parsing-with-awk/ which says that parsing csv is already very hard (For the beginning it should be enough to parse normal strings with spaces, the escaped variant is very rare)
Before i mess around a long time: Is there any way to do this in awk or would i better use some other language?