Fsdb::F...bmerge2(3)
π NAME π
Okay bestie, welcome to the Fsdb::F...bmerge2(3) manual page β it's all about dbmerge2. This icon merges exactly two inputs in sorted order based on the the specified columns. Periodt. π
β¨ SYNOPSIS β¨
Two whole vibes, bestie:
dbmerge2 --input A.fsdb --input B.fsdb [-T TemporaryDirectory] [-nNrR] column [column...]
or
cat A.fsdb | dbmerge2 --input B.fsdb [-T TemporaryDirectory] [-nNrR] column [column...]
π¦ DESCRIPTION π¦
Merge exactly two sorted input files, producing one sorted result. Inputs can both be specified with --input, or one can come from standard input and the other from --input. That's the whole setup. π
Inputs must have identical schemas (columns, column order, and field separators). No mixing and matching, bestie.
Dbmerge2 consumes a fixed amount of memory regardless of input size. Lowkey iconic. β¨
Although described above as a command line too, the command line version of dbmerge2 is not installed by default. Dbmerge2 is used primarily internal to perl; dbmerge(1) is the command-line tool for user use. So if you're looking for the user-facing one, that's the one, iykyk.
β οΈ Warning: we do not verify that each input is actually sorted. Incorrect merge results will occur if they are not. Fr fr, check your sort first. π
π OPTIONS π
General option:
--saveoutput$OUT_REFβ save output writer (for integration with other fsdb filters).-TTmpDir β where to put tmp files. Also uses environment variableTMPDIR, if-Tis not specified. Default is/tmp.
Sort specification options (can be interspersed with column names):
-r,--descendingβ sort in reverse order (high to low)-R,--ascendingβ sort in normal order (low to high)-n,--numericβ sort numerically-N,--lexicalβ sort lexicographically
This module also supports the standard fsdb options:
-dβ enable debugging output.-i,--inputInputSource β read from InputSource, typically a file name, or-for standard input, or (if in Perl) aIO::Handle,Fsdb::IOorFsdb::BoundedQueueobjects.-o,--outputOutputDestination β write to OutputDestination, typically a file name, or-for standard output, or (if in Perl) aIO::Handle,Fsdb::IOorFsdb::BoundedQueueobjects.--autorun,--noautorunβ by default, programs process automatically, butFsdb::Filterobjects in Perl do not run until you invoke therun()method. The--(no)autorunoption controls that behavior within Perl.--headerH β use H as the full Fsdb header, rather than reading a header from then input.--helpβ show help.--manβ show full manual.
π SAMPLE USAGE π
π Input:
File a.fsdb:
#fsdb cid cname
11 numanal
10 pascal
File b.fsdb:
#fsdb cid cname
12 os
13 statistics
πΈ Command:
dbmerge2 --input a.fsdb --input b.fsdb cname
or
cat a.fsdb | dbmerge2 --input b.fsdb cname
β Output:
#fsdb cid cname
11 numanal
12 os
10 pascal
13 statistics
# | dbmerge2 --input a.fsdb --input b.fsdb cname
π§ SEE ALSO π§
dbmerge(1), dbsort(1), Fsdb(3).
π CLASS FUNCTIONS π
π οΈ new
$filter = new Fsdb::Filter::dbmerge2(@arguments);
Create a new object, taking command-line arguments.
π οΈ set_defaults
$filter->set_defaults();
Internal: set up defaults.
π οΈ parse_options
$filter->parse_options(@ARGV);
Internal: parse command-line arguments.
π οΈ setup
$filter->setup();
Internal: setup, parse headers.
π οΈ run
$filter->run();
Internal: run over each rows.
π AUTHOR and COPYRIGHT π
Copyright (C) 1991-2022 by John Heidemann <johnh@isi.edu>
This program is distributed under terms of the GNU general public license, version 2. See the file COPYING with the distribution for details.
π That's the whole page, bestie β source/version perl v5.32.1, dated 2024-08-02. Byeee! π
π¦ where this page comes from
- epel 9: perl-Fsdb 2:3.9-1.el9 Β· GPLv2
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms