zsh-users
 help / color / mirror / code / Atom feed
* Parsing CVS files
@ 2019-02-02 18:59 Dominik Vogt
  2019-02-02 20:14 ` Peter Stephenson
  0 siblings, 1 reply; 4+ messages in thread
From: Dominik Vogt @ 2019-02-02 18:59 UTC (permalink / raw)
  To: Zsh Users

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

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2019-02-05 21:30 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-02-02 18:59 Parsing CVS files Dominik Vogt
2019-02-02 20:14 ` Peter Stephenson
2019-02-03  4:19   ` Sebastian Gniazdowski
2019-02-05 21:30     ` Dominik Vogt

Code repositories for project(s) associated with this public inbox

	https://git.vuxu.org/mirror/zsh/

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).