1Fsdb::Filter::dbmerge2(U3s)er Contributed Perl DocumentatFisodnb::Filter::dbmerge2(3)
2
3
4
6 dbmerge2 - merge exactly two inputs in sorted order based on the the
7 specified columns
8
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
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
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 --help
78 Show help.
79
80 --man
81 Show full manual.
82
84 Input:
85 File a.fsdb:
86
87 #fsdb cid cname
88 11 numanal
89 10 pascal
90
91 File b.fsdb:
92
93 #fsdb cid cname
94 12 os
95 13 statistics
96
97 Command:
98 dbmerge2 --input a.fsdb --input b.fsdb cname
99
100 or
101
102 cat a.fsdb | dbmerge2 --input b.fsdb cname
103
104 Output:
105 #fsdb cid cname
106 11 numanal
107 12 os
108 10 pascal
109 13 statistics
110 # | dbmerge2 --input a.fsdb --input b.fsdb cname
111
113 dbmerge(1), dbsort(1), Fsdb(3)
114
116 new
117 $filter = new Fsdb::Filter::dbmerge2(@arguments);
118
119 Create a new object, taking command-line arguments.
120
121 set_defaults
122 $filter->set_defaults();
123
124 Internal: set up defaults.
125
126 parse_options
127 $filter->parse_options(@ARGV);
128
129 Internal: parse command-line arguments.
130
131 setup
132 $filter->setup();
133
134 Internal: setup, parse headers.
135
136 run
137 $filter->run();
138
139 Internal: run over each rows.
140
142 Copyright (C) 1991-2018 by John Heidemann <johnh@isi.edu>
143
144 This program is distributed under terms of the GNU general public
145 license, version 2. See the file COPYING with the distribution for
146 details.
147
148
149
150perl v5.28.1 2018-02-17 Fsdb::Filter::dbmerge2(3)