Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
Parsing CVS files
- X-seq: zsh-users 23853
- From: Dominik Vogt <dominik.vogt@xxxxxx>
- To: Zsh Users <zsh-users@xxxxxxx>
- Subject: Parsing CVS files
- Date: Sat, 2 Feb 2019 19:59:11 +0100
- List-help: <mailto:zsh-users-help@zsh.org>
- List-id: Zsh Users List <zsh-users.zsh.org>
- List-post: <mailto:zsh-users@zsh.org>
- List-unsubscribe: <mailto:zsh-users-unsubscribe@zsh.org>
- Mail-followup-to: Zsh Users <zsh-users@xxxxxxx>
- Mailing-list: contact zsh-users-help@xxxxxxx; run by ezmlm
- Reply-to: dominik.vogt@xxxxxx
Hi folks,
I'm looking for an easy way to split the lines of a .csv file into
the fields of an array variable. There's a script that does that
somewhore on the net. But that script parses lines character by
character and just manages to parse about 100 (long) lines per
second.
Fields in a .csv file are separated by commas, *but* commas
between a pair of quotes do not split. Or phrased differently:
Commas that have an even number of double quotes left of them do
split, but commas with an uneven number left of then don't split.
Any ideas for a quick implementation?
Ciao
Dominik ^_^ ^_^
--
Dominik Vogt
Messages sorted by:
Reverse Date,
Date,
Thread,
Author