By downloading this code you agree to the
Source Code Use License (PDF). |
{ version = 1.10; (* of csv2ssv.p 2018 Feb 22}
(* begin module describe.csv2ssv *)
(*
name
csv2ssv: convert a comma delimited csv file to a space delimited file
synopsis
csv2ssv(input: in, output: out)
files
input: a csv file
output: the csv file converted to space delimited file
description
In the csv 'comma separated variable' file format, columns of a
table are separated by commas.
Delila programs usually use space separation. This routine
converts the csv to a space separated file.
To convert to the Delila-style space delimited table, the following
rules apply:
Spaces are converted to underscores.
Double quotes (") spaces are removed.
Commas are replaced by spaces.
Commas inside quotes are ignored!
Two successive commas meaning 'nothing' are replaced by a ',_,'
so that '_' represents 'nothing' in the output file.
examples
"First","Second title",1
"Fourth","Third line",2
"Fifth","Sixth",3
"Fifth",,"Sixth"
"ignore this, comma",,"Sixth"
result:
First Second_title 1
Fourth Third_line 2
Fifth Sixth 3
double-comma _ Sixth
ignore_this,_comma _ Sixth
documentation
see also
author
Thomas Dana Schneider
bugs
technical notes
The csv file format uses commas to separate columns. The unmkcsv
script can handle this except when there is a comma inside a quote.
In that case the program has to be smart to know where quotes are.
*)
(* end module describe.csv2ssv *)
{This manual page was created by makman 1.45}
{created by htmlink 1.62}