1DBCOLSPLITTOROWS(1) User Contributed Perl Documentation DBCOLSPLITTOROWS(1)
2
3
4
6 dbcolsplittorows - split an existing column into multiple new rows
7
9 dbcolsplittorows [-C ElementSeperator] [-e null] [-E] [-N
10 enumerated-name] column [column...]
11
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
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
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
91 Fsdb(1). dbcolmerge(1). dbcolsplittocols(1). dbcolrename(1).
92 dbfilepvot(1).
93
95 Copyright (C) 1991-2018 by John Heidemann <johnh@isi.edu>
96
97 This program is distributed under terms of the GNU general public
98 license, version 2. See the file COPYING with the distribution for
99 details.
100
101
102
103perl v5.32.0 2020-11-16 DBCOLSPLITTOROWS(1)