dbsubprocess - invoke a subprocess as a Fsdb filter object
dbsubprocess [--] program [arguments...]
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.
As with similar tools, like open2, the caller is expected to take care that the subprocess does not deadlock.
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.
Enable warnings in user supplied code. (Default to include warnings.)
Call Perl SUB when the subprocess terminates. The sub runs in the parent and is a Fred ending sub, see Fsdb::Support::Freds.
and the standard fsdb options:
Enable debugging output.
Read from InputSource, typically a file, or - for standard input, or (if in Perl) a IO::Handle, Fsdb::IO objects. (For this case, it cannot be Fsdb::BoundedQueue).
Write to OutputDestination, typically a file, or - for standard output, or (if in Perl) a IO::Handle, Fsdb::IO or Fsdb::BoundedQueue objects.
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.
--(no)autorun
Show help.
Show full manual.
#fsdb name id test1 a 1 80 b 2 70 c 3 65 d 4 90 e 5 70 f 6 90
the following perl code:
use Fsdb::Filter::dbsubprocess; my $f = new Fsdb::Filter::dbsubprocess(qw(cat)); $f->setup_run_finish; exit 0;
#fsdb name id test1 a 1 80 b 2 70 c 3 65 d 4 90 e 5 70 f 6 90 # | dbsubprocess cat
dbpipeline(1), Fsdb(3)
$filter = new Fsdb::Filter::dbsubprocess(@arguments);
Create a new dbsubprocess object, taking command-line arguments.
$filter->set_defaults();
Internal: set up defaults.
$filter->parse_options(@ARGV);
Internal: parse options
$filter->setup();
Internal: setup, parse headers.
$filter->run();
Internal: run over all data rows.
$filter->finish();
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.
To install Fsdb, copy and paste the appropriate command in to your terminal.
cpanm
cpanm Fsdb
CPAN shell
perl -MCPAN -e shell install Fsdb
For more information on module installation, please visit the detailed CPAN module installation guide.