1Fsdb::Filter::dbcolmergUes(e3r)Contributed Perl DocumentFastdibo:n:Filter::dbcolmerge(3)
2
3
4

NAME

6       dbcolmerge - merge multiple columns into one
7

SYNOPSIS

9       dbcolmerge [-C ElementSeparator] [columns...]
10

DESCRIPTION

12       For each row, merge multiple columns down to a single column (always a
13       string), joining elements with ElementSeparator (defaults to a single
14       underscore).
15

OPTIONS

17       -C S or --element-separator S
18           Specify the separator used to join columns.  (Defaults to a single
19           underscore.)
20
21       -e E or --empty E
22           give value E as the value for empty (null) records
23
24       This module also supports the standard fsdb options:
25
26       -d  Enable debugging output.
27
28       -i or --input InputSource
29           Read from InputSource, typically a file name, or "-" for standard
30           input, or (if in Perl) a IO::Handle, Fsdb::IO or Fsdb::BoundedQueue
31           objects.
32
33       -o or --output OutputDestination
34           Write to OutputDestination, typically a file name, or "-" for
35           standard output, or (if in Perl) a IO::Handle, Fsdb::IO or
36           Fsdb::BoundedQueue objects.
37
38       --autorun or --noautorun
39           By default, programs process automatically, but Fsdb::Filter
40           objects in Perl do not run until you invoke the run() method.  The
41           "--(no)autorun" option controls that behavior within Perl.
42
43       --header H
44           Use H as the full Fsdb header, rather than reading a header from
45           then input.
46
47       --help
48           Show help.
49
50       --man
51           Show full manual.
52

SAMPLE USAGE

54   Input:
55           #fsdb      first   last
56           John    Heidemann
57           Greg    Johnson
58           Root    -
59           # this is a simple database
60           #  | /home/johnh/BIN/DB/dbcol fullname
61           #  | dbcolrename fullname first_last
62           #  | /home/johnh/BIN/DB/dbcolsplit -C _ first_last
63           #  | /home/johnh/BIN/DB/dbcol first last
64
65   Command:
66           cat data.fsdb | dbcolmerge -C _ first last
67
68   Output:
69           #fsdb      first   last    first_last
70           John    Heidemann       John_Heidemann
71           Greg    Johnson Greg_Johnson
72           Root    -        Root_
73           # this is a simple database
74           #  | /home/johnh/BIN/DB/dbcol fullname
75           #  | dbcolrename fullname first_last
76           #  | /home/johnh/BIN/DB/dbcolsplit first_last
77           #  | /home/johnh/BIN/DB/dbcol first last
78           #  | /home/johnh/BIN/DB/dbcolmerge -C _ first last
79

SEE ALSO

81       Fsdb.  dbcolsplittocols.  dbcolsplittorows.  dbcolrename.
82

CLASS FUNCTIONS

84   new
85           $filter = new Fsdb::Filter::dbcolmerge(@arguments);
86
87       Create a new dbcolmerge object, taking command-line arguments.
88
89   set_defaults
90           $filter->set_defaults();
91
92       Internal: set up defaults.
93
94   parse_options
95           $filter->parse_options(@ARGV);
96
97       Internal: parse command-line arguments.
98
99   setup
100           $filter->setup();
101
102       Internal: setup, parse headers.
103
104   run
105           $filter->run();
106
107       Internal: run over each rows.
108
110       Copyright (C) 1991-2022 by John Heidemann <johnh@isi.edu>
111
112       This program is distributed under terms of the GNU general public
113       license, version 2.  See the file COPYING with the distribution for
114       details.
115
116
117
118perl v5.36.0                      2022-11-22       Fsdb::Filter::dbcolmerge(3)
Impressum