1Fsdb::Filter::db_to_csvU(s3e)r Contributed Perl DocumentaFtsidobn::Filter::db_to_csv(3)
2
3
4
6 db_to_csv - convert fsdb to the comma-separated-value file-format
7
9 db_to_csv [-C]
10
12 Covert an existing fsdb file to comma-separated value format.
13
14 Input is fsdb format.
15
16 Output is CSV-format plain text (not fsdb).
17
19 -C or <--omit-comments>
20 Also strip all comments.
21
22 This module also supports the standard fsdb options:
23
24 -d Enable debugging output.
25
26 -i or --input InputSource
27 Read from InputSource, typically a file name, or "-" for standard
28 input, or (if in Perl) a IO::Handle, Fsdb::IO or Fsdb::BoundedQueue
29 objects.
30
31 -o or --output OutputDestination
32 Write to OutputDestination, typically a file name, or "-" for
33 standard output, or (if in Perl) a IO::Handle, Fsdb::IO or
34 Fsdb::BoundedQueue objects.
35
36 --autorun or --noautorun
37 By default, programs process automatically, but Fsdb::Filter
38 objects in Perl do not run until you invoke the run() method. The
39 "--(no)autorun" option controls that behavior within Perl.
40
41 --help
42 Show help.
43
44 --man
45 Show full manual.
46
48 Input:
49 #fsdb -F S paper papertitle reviewer reviewername score1 score2 score3 score4 score5
50 1 test, paper 2 Smith 4 4 - - -
51 2 other paper 3 Jones 3 3 - - -
52 2 input double space 3 Jones 3 3 - - -
53 # | csv_to_db
54
55 Command:
56 cat data.fsdb | db_to_csv
57
58 Output:
59 paper,papertitle,reviewer,reviewername,score1,score2,score3,score4,score5
60 1,"test, paper",2,Smith,4,4,-,-,-
61 2,"other paper",3,Jones,3,3,-,-,-
62 2,"input double space",3,Jones,3,3,-,-,-
63 # | csv_to_db
64 # | db_to_csv
65
67 Fsdb. dbfilealter. csv_to_db
68
70 new
71 $filter = new Fsdb::Filter::db_to_csv(@arguments);
72
73 Create a new db_to_csv object, taking command-line arguments.
74
75 set_defaults
76 $filter->set_defaults();
77
78 Internal: set up defaults.
79
80 parse_options
81 $filter->parse_options(@ARGV);
82
83 Internal: parse command-line arguments.
84
85 setup
86 $filter->setup();
87
88 Internal: setup, parse headers.
89
90 run
91 $filter->run();
92
93 Internal: run over each row.
94
96 Copyright (C) 2007-2018 by John Heidemann <johnh@isi.edu>
97
98 This program is distributed under terms of the GNU general public
99 license, version 2. See the file COPYING with the distribution for
100 details.
101
102
103
104perl v5.34.0 2021-07-22 Fsdb::Filter::db_to_csv(3)