1DBMERGE2(1) User Contributed Perl Documentation DBMERGE2(1)
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 --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
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
117 dbmerge(1), dbsort(1), Fsdb(3)
118
120 Copyright (C) 1991-2019 by John Heidemann <johnh@isi.edu>
121
122 This program is distributed under terms of the GNU general public
123 license, version 2. See the file COPYING with the distribution for
124 details.
125
126
127
128perl v5.32.0 2020-11-16 DBMERGE2(1)