1Fsdb::Filter::dbmerge2(U3s)er Contributed Perl DocumentatFisodnb::Filter::dbmerge2(3)
2
3
4

NAME

6       dbmerge2 - merge exactly two inputs in sorted order based on the the
7       specified columns
8

SYNOPSIS

10           dbmerge2 --input A.fsdb --input B.fsdb [-T TemporaryDirectory] [-nNrR] column [column...]
11
12       or
13           cat A.fsdb | dbmerge2 --input B.fsdb [-T TemporaryDirectory]
14       [-nNrR] column [column...]
15

DESCRIPTION

17       Merge exactly two sorted input files, producing one sorted result.
18       Inputs can both be specified with "--input", or one can come from
19       standard input and the other from "--input".
20
21       Inputs must have identical schemas (columns, column order, and field
22       separators).
23
24       Dbmerge2 consumes a fixed amount of memory regardless of input size.
25
26       Although described above as a command line too, the command line
27       version of dbmerge2 is not installed by default.  Dbmerge2 is used
28       primarily internal to perl; dbmerge(1) is the command-line tool for
29       user use.
30
31       Warning: we do not verify that each input is actually sorted.  In
32       correct merge results will occur if they are not.
33

OPTIONS

35       General option:
36
37       --saveoutput $OUT_REF
38           Save output writer (for integration with other fsdb filters).
39
40       <-T TmpDir>
41           where to put tmp files.  Also uses environment variable TMPDIR, if
42           -T is not specified.  Default is /tmp.
43
44       Sort specification options (can be interspersed with column names):
45
46       -r or --descending
47           sort in reverse order (high to low)
48
49       -R or --ascending
50           sort in normal order (low to high)
51
52       -n or --numeric
53           sort numerically
54
55       -N or --lexical
56           sort lexicographically
57
58       This module also supports the standard fsdb options:
59
60       -d  Enable debugging output.
61
62       -i or --input InputSource
63           Read from InputSource, typically a file name, or "-" for standard
64           input, or (if in Perl) a IO::Handle, Fsdb::IO or Fsdb::BoundedQueue
65           objects.
66
67       -o or --output OutputDestination
68           Write to OutputDestination, typically a file name, or "-" for
69           standard output, or (if in Perl) a IO::Handle, Fsdb::IO or
70           Fsdb::BoundedQueue objects.
71
72       --autorun or --noautorun
73           By default, programs process automatically, but Fsdb::Filter
74           objects in Perl do not run until you invoke the run() method.  The
75           "--(no)autorun" option controls that behavior within Perl.
76
77       --header H
78           Use H as the full Fsdb header, rather than reading a header from
79           then input.
80
81       --help
82           Show help.
83
84       --man
85           Show full manual.
86

SAMPLE USAGE

88   Input:
89       File a.fsdb:
90
91           #fsdb cid cname
92           11 numanal
93           10 pascal
94
95       File b.fsdb:
96
97           #fsdb cid cname
98           12 os
99           13 statistics
100
101   Command:
102           dbmerge2 --input a.fsdb --input b.fsdb cname
103
104       or
105
106           cat a.fsdb | dbmerge2 --input b.fsdb cname
107
108   Output:
109           #fsdb      cid     cname
110           11 numanal
111           12 os
112           10 pascal
113           13 statistics
114           #  | dbmerge2 --input a.fsdb --input b.fsdb cname
115

SEE ALSO

117       dbmerge(1), dbsort(1), Fsdb(3)
118

CLASS FUNCTIONS

120   new
121           $filter = new Fsdb::Filter::dbmerge2(@arguments);
122
123       Create a new object, taking command-line arguments.
124
125   set_defaults
126           $filter->set_defaults();
127
128       Internal: set up defaults.
129
130   parse_options
131           $filter->parse_options(@ARGV);
132
133       Internal: parse command-line arguments.
134
135   setup
136           $filter->setup();
137
138       Internal: setup, parse headers.
139
140   run
141           $filter->run();
142
143       Internal: run over each rows.
144
146       Copyright (C) 1991-2022 by John Heidemann <johnh@isi.edu>
147
148       This program is distributed under terms of the GNU general public
149       license, version 2.  See the file COPYING with the distribution for
150       details.
151
152
153
154perl v5.34.1                      2022-04-04         Fsdb::Filter::dbmerge2(3)
Impressum