I have a CSV file and want to discard a couple of columns. So let's say this is a sample file:
column a, column b, column c
value a, value b, value c
value a, "quoted, b", value c
And now let's say we would want to discard column b, so that the result is:
column a, column c
value a, value c
value a, value c
If there were not the quoted string "quoated, b" I could do this with cut:
cut -d ',' -f 1,3
However there is this quoted string. I could just load the file with libreoffice, but besides of being less cool and automatable my files are several hundered MB and some even exceed the maximum number of rows for LibreOffice Calc.
(Side note: My actual files have more like 30 columns and I'd like to select about 5-10 columns of those. So it is not like "discard the last column")