Fsdb::F...process(3)
okay bestie, welcome to the Fsdb::F...process(3) page from User Contributed Perl Documentation β itβs all about dbsubprocess, and itβs lowkey iconic for internal Perl filter stuff. π
β¨
π NAME π
dbsubprocess β invoke a subprocess as a Fsdb filter object. fr fr, thatβs the whole name. π«Ά
πΈ SYNOPSIS πΈ
hereβs the shape, no cap:
dbsubprocess [--] program [arguments...]
π DESCRIPTION π
Run PROGRAM as a process, with optional ARGUMENTS as program arguments, feeding its standard input and standard output as fsdb streams. A -- can separate arguments to dbsubprocess from the program and its arguments. π
and yeah, as with similar tools like open2, the caller is expected to take care that the subprocess does not deadlock. no pressure or anything π
this program is primarily for internal use by dbmapreduce. like dbpipeline, dbsubprocess program does have a Unix command; instead it is used only from within Perl. iykyk. π¦
π OPTIONS π
okay, options time β every single one, bestie:
-w,--warningsβ enable warnings in user supplied code. (Default to include warnings.) π«Ά-E,--endsubSUB β call PerlSUBwhen the subprocess terminates. The sub runs in the parent and is a Fred ending sub, seeFsdb::Support::Freds. β¨
and the standard fsdb options:
-dβ enable debugging output. π₯-i,--inputInputSource β read from InputSource, typically a file, or-for standard input, or (if in Perl) aIO::Handle,Fsdb::IOobjects. (For this case, it cannot beFsdb::BoundedQueue.) π-o,--outputOutputDestination β write to OutputDestination, typically a file, 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)autorun"option controls that behavior within Perl. π¦--helpβ show help. π--manβ show full manual. π
π¦ SAMPLE USAGE π¦
π Input:
#fsdb name id test1
a 1 80
b 2 70
c 3 65
d 4 90
e 5 70
f 6 90
π Command:
the following perl code:
use Fsdb::Filter::dbsubprocess;
my $f = new Fsdb::Filter::dbsubprocess(qw(cat));
$f->setup_run_finish;
exit 0;
β Output:
#fsdb name id test1
a 1 80
b 2 70
c 3 65
d 4 90
e 5 70
f 6 90
# | dbsubprocess cat
π₯ SEE ALSO π₯
dbpipeline(1), Fsdb(3) β go look, bestie. π
π CLASS FUNCTIONS π
π§ new
$filter = new Fsdb::Filter::dbsubprocess(@arguments);
Create a new dbsubprocess object, taking command-line arguments. π
πΈ set_defaults
$filter->set_defaults();
Internal: set up defaults. π
π¦ parse_options
$filter->parse_options(@ARGV);
Internal: parse options. β¨
π setup
$filter->setup();
Internal: setup, parse headers. π
π₯ run
$filter->run();
Internal: run over all data rows. π«Ά
π finish
$filter->finish();
Internal: run over all data rows. π
π AUTHOR and COPYRIGHT π
Copyright (C) 1991-2018 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 vibes: perl v5.32.1, dated 2024-08-02. periodt. πβ¨
π¦ 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