1Fsdb::Filter::csv_to_dbU(s3e)r Contributed Perl DocumentaFtsidobn::Filter::csv_to_db(3)
2
3
4

NAME

6       csv_to_db - convert comma-separated-value data into fsdb
7

SYNOPSIS

9           csv_to_db <source.csv
10

DESCRIPTION

12       Converts a comma-separated-value data stream to Fsdb format.
13
14       The input is CSV-format (not fsdb).  The first row is taken to be the
15       names of the columns.
16
17       The output is two-space-separated fsdb.  (Someday more general field
18       separators should be supported.)  Fsdb fields are normalized version of
19       the CSV file: spaces are converted to single underscores.
20

OPTIONS

22       -F or --fs or --fieldseparator S
23           Specify the field (column) separator as "S".  See dbfilealter for
24           valid field separators.  Default is S (double space).
25
26       This module also supports the standard fsdb options:
27
28       -d  Enable debugging output.
29
30       -i or --input InputSource
31           Read from InputSource, typically a file name, or "-" for standard
32           input, or (if in Perl) a IO::Handle, Fsdb::IO or Fsdb::BoundedQueue
33           objects.
34
35       -o or --output OutputDestination
36           Write to OutputDestination, typically a file name, or "-" for
37           standard output, or (if in Perl) a IO::Handle, Fsdb::IO or
38           Fsdb::BoundedQueue objects.
39
40       --autorun or --noautorun
41           By default, programs process automatically, but Fsdb::Filter
42           objects in Perl do not run until you invoke the run() method.  The
43           "--(no)autorun" option controls that behavior within Perl.
44
45       --help
46           Show help.
47
48       --man
49           Show full manual.
50

SAMPLE USAGE

52   Input:
53           paper,papertitle,reviewer,reviewername,score1,score2,score3,score4,score5
54
55           1,"test, paper",2,Smith,4,4,,,
56           2,other paper,3,Jones,3,3,,,
57
58   Command:
59           csv_to_db
60
61   Output:
62           #fsdb -F S paper papertitle reviewer reviewername score1 score2 score3 score4 score5
63           1  test, paper  2  Smith  4  4  -  -  -
64           2  other paper  3  Jones  3  3  -  -  -
65           #  | csv_to_db
66

SEE ALSO

68       Fsdb.  db_to_csv.
69

CLASS FUNCTIONS

71   new
72           $filter = new Fsdb::Filter::csv_to_db(@arguments);
73
74       Create a new csv_to_db object, taking command-line arguments.
75
76   set_defaults
77           $filter->set_defaults();
78
79       Internal: set up defaults.
80
81   parse_options
82           $filter->parse_options(@ARGV);
83
84       Internal: parse command-line arguments.
85
86   setup
87           $filter->setup();
88
89       Internal: setup, parse headers.
90
91   run
92           $filter->run();
93
94       Internal: run over each rows.
95
97       Copyright (C) 1991-2008 by John Heidemann <johnh@isi.edu>
98
99       This program is distributed under terms of the GNU general public
100       license, version 2.  See the file COPYING with the distribution for
101       details.
102
103
104
105perl v5.32.0                      2020-11-16        Fsdb::Filter::csv_to_db(3)
Impressum