1Fsdb::Filter::dbcolspliUtsteorroCwosn(t3r)ibuted Perl DoFcsudmbe:n:tFaitlitoenr::dbcolsplittorows(3)
2
3
4

NAME

6       dbcolsplittorows - split an existing column into multiple new rows
7

SYNOPSIS

9       dbcolsplittorows [-C ElementSeperator] [-e null] [-E] [-N
10       enumerated-name] column [column...]
11

DESCRIPTION

13       Split column into pieces, outputting one row for each piece.
14
15       By default, any empty fields are ignored.  If an empty field value is
16       given with -e, then they produce output.
17
18       When a null value is given, empty fields at the beginning and end of
19       lines are suppressed (like perl split).  Unlike perl, if ALL fields are
20       empty, we generate one (and not zero) empty fields.
21
22       The inverse of this commend is dbfilepivot.
23

OPTIONS

25       -C S or --element-separator S
26           Specify the separator used to split columns.  (Defaults to a single
27           underscore.)
28
29       -E or --enumerate
30           Enumerate output columns: rather than assuming the column name uses
31           the element separator, we keep it whole and fill in with indexes
32           starting from 0.
33
34       -N or --new-name N
35           Name the new column N for enumeration.  Defaults to "index".
36
37       -e E or --empty E
38           give value E as the value for empty (null) records
39
40       This module also supports the standard fsdb options:
41
42       -d  Enable debugging output.
43
44       -i or --input InputSource
45           Read from InputSource, typically a file name, or "-" for standard
46           input, or (if in Perl) a IO::Handle, Fsdb::IO or Fsdb::BoundedQueue
47           objects.
48
49       -o or --output OutputDestination
50           Write to OutputDestination, typically a file name, or "-" for
51           standard output, or (if in Perl) a IO::Handle, Fsdb::IO or
52           Fsdb::BoundedQueue objects.
53
54       --autorun or --noautorun
55           By default, programs process automatically, but Fsdb::Filter
56           objects in Perl do not run until you invoke the run() method.  The
57           "--(no)autorun" option controls that behavior within Perl.
58
59       --help
60           Show help.
61
62       --man
63           Show full manual.
64

SAMPLE USAGE

66   Input:
67           #fsdb name uid
68           John_Heidemann  2274
69           Greg_Johnson    2275
70           Root    0
71           # this is a simple database
72           #  | dbcol fullname uid
73           #  | dbcolrename fullname name
74
75   Command:
76           cat data.fsdb | dbcolsplittorows name
77
78   Output:
79           #fsdb name uid
80           John    2274
81           Heidemann       2274
82           Greg    2275
83           Johnson 2275
84           Root    0
85           # this is a simple database
86           #  | dbcol fullname uid
87           #  | dbcolrename fullname name
88           #  | dbcolsplittorows name
89

SEE ALSO

91       Fsdb(1).  dbcolmerge(1).  dbcolsplittocols(1).  dbcolrename(1).
92       dbfilepvot(1).
93

CLASS FUNCTIONS

95   new
96           $filter = new Fsdb::Filter::dbcolsplittocols(@arguments);
97
98       Create a new dbcolsplittocols object, taking command-line arguments.
99
100   set_defaults
101           $filter->set_defaults();
102
103       Internal: set up defaults.
104
105   parse_options
106           $filter->parse_options(@ARGV);
107
108       Internal: parse command-line arguments.
109
110   setup
111           $filter->setup();
112
113       Internal: setup, parse headers.
114
115   run
116           $filter->run();
117
118       Internal: run over each rows.
119
121       Copyright (C) 1991-2018 by John Heidemann <johnh@isi.edu>
122
123       This program is distributed under terms of the GNU general public
124       license, version 2.  See the file COPYING with the distribution for
125       details.
126
127
128
129perl v5.30.0                      2019-09-19 Fsdb::Filter::dbcolsplittorows(3)
Impressum