csv2sc

NAME

csv2sc - convert a CSV stream to a format readable by the sc spreadsheet. It takes its input from the standard input and returns the converted stream to the standard output

SYNOPSIS

csv2sc [-?|-h|--help] [-d CHAR|--delimiter CHAR] [-r INTEGER|--row INTEGER] [-c INTEGER|--column INTEGER]

DESCRIPTION

csv2sc converts CSV (comma-separated values) streams or files to the native format used by the sc(1) spreadsheet calculator. Each line of input represents a record and, by default, fields are separated by commas (','). Option -d allows to define an alternative separator (for instance the tab: '\t'). Numerical values are used as numerical values (let CELL = VALUE) and non numerical values are used as left aligned strings (leftstring CELL = "VALUE"). The maximum number of fields is 676 (26*26). Offsets can be specified with options -r and -c.

EXAMPLES

me@mycomputer> cat file.csv | csv2sc -d '\t' | sc

me@mycomputer> csv2sc -d ':' < file.csv > file.sc

OPTIONS

-h, --help, -?

Returns the manual page

-d CHAR, --delimiter CHAR

Use an alternative delimiter between the fields. The character should be single-quoted. Examples: '|', ':', '\t' (default: ',')

-r INTEGER, --row INTEGER

Insert the data starting from the row of a specified indice (default: 0)

-c INTEGER, --column INTEGER

Insert the data starting from the column of a specified indice (default: 0)

AUTHORS

Written by Pierre Smars (first version: 2019)

BUGS

Reports of bugs or problems should be submitted via electronic mail to <smars@yuntech.edu.tw>.

COPYRIGHT

Copyright (C) 2019 Pierre Smars. License GPLv2 <http://www.gnu.org/licenses/gpl-2.0.html>. This is free software: you are free to change and redistribute it. There is NO WARRANTY, to the extent permitted by law.

SEE ALSO

sc(1), paste(1), gnumeric(1)

Pierre SMARS (tools, home page)