Fsdb::F...bmerge2(3)

πŸ“¦
version 3.9 Β· 3 versions
, in epel 9

πŸ’– 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).
  • -T TmpDir β€” where to put tmp files. Also uses environment variable TMPDIR, if -T is 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, --input InputSource β€” read from InputSource, typically a file name, or - for standard input, or (if in Perl) a IO::Handle, Fsdb::IO or Fsdb::BoundedQueue objects.
  • -o, --output OutputDestination β€” write to OutputDestination, typically a file name, or - for standard output, or (if in Perl) a IO::Handle, Fsdb::IO or Fsdb::BoundedQueue objects.
  • --autorun, --noautorun β€” by default, programs process automatically, but Fsdb::Filter objects in Perl do not run until you invoke the run() method. The --(no)autorun option controls that behavior within Perl.
  • --header H β€” 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.


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