1Fsdb::Filter::dbsubprocUessesr(3C)ontributed Perl DocumeFnstdabt:i:oFnilter::dbsubprocess(3)
2
3
4

NAME

6       dbsubprocess - invoke a subprocess as a Fsdb filter object
7

SYNOPSIS

9           dbsubprocess [--] program [arguments...]
10

DESCRIPTION

12       Run PROGRAM as a process, with optional ARGUMENTS as program arguments,
13       feeding its standard input and standard output as fsdb streams.  A "--"
14       can separate arguments to dbsubprocess from the program and its
15       arguments.
16
17       As with similar tools, like open2, the caller is expected to take care
18       that the subprocess does not deadlock.
19
20       This program is primarily for internal use by dbmapreduce.
21
22       Like dbpipeline, dbsubprocess program does have a Unix command; instead
23       it is used only from within Perl.
24

OPTIONS

26       -w or --warnings
27           Enable warnings in user supplied code.  (Default to include
28           warnings.)
29
30       -E or --endsub SUB
31           Call Perl SUB when the subprocess terminates.  The sub runs in the
32           parent and is a Fred ending sub, see Fsdb::Support::Freds.
33
34       and the standard fsdb options:
35
36       -d  Enable debugging output.
37
38       -i or --input InputSource
39           Read from InputSource, typically a file, or - for standard input,
40           or (if in Perl) a IO::Handle, Fsdb::IO objects.  (For this case, it
41           cannot be Fsdb::BoundedQueue).
42
43       -o or --output OutputDestination
44           Write to OutputDestination, typically a file, or - for standard
45           output, or (if in Perl) a IO::Handle, Fsdb::IO or
46           Fsdb::BoundedQueue objects.
47
48       --autorun or --noautorun
49           By default, programs process automatically, but Fsdb::Filter
50           objects in Perl do not run until you invoke the run() method.  The
51           "--(no)autorun" option controls that behavior within Perl.
52
53       --help
54           Show help.
55
56       --man
57           Show full manual.
58

SAMPLE USAGE

60   Input:
61               #fsdb name id test1
62               a       1       80
63               b       2       70
64               c       3       65
65               d       4       90
66               e       5       70
67               f       6       90
68
69   Command:
70       the following perl code:
71
72           use Fsdb::Filter::dbsubprocess;
73           my $f = new Fsdb::Filter::dbsubprocess(qw(cat));
74           $f->setup_run_finish;
75           exit 0;
76
77   Output:
78               #fsdb name id test1
79               a       1       80
80               b       2       70
81               c       3       65
82               d       4       90
83               e       5       70
84               f       6       90
85               #   | dbsubprocess cat
86

SEE ALSO

88       dbpipeline(1), Fsdb(3)
89

CLASS FUNCTIONS

91   new
92           $filter = new Fsdb::Filter::dbsubprocess(@arguments);
93
94       Create a new dbsubprocess object, taking command-line arguments.
95
96   set_defaults
97           $filter->set_defaults();
98
99       Internal: set up defaults.
100
101   parse_options
102           $filter->parse_options(@ARGV);
103
104       Internal: parse options
105
106   setup
107           $filter->setup();
108
109       Internal: setup, parse headers.
110
111   run
112           $filter->run();
113
114       Internal: run over all data rows.
115
116   finish
117           $filter->finish();
118
119       Internal: run over all data rows.
120
122       Copyright (C) 1991-2018 by John Heidemann <johnh@isi.edu>
123
124       This program is distributed under terms of the GNU general public
125       license, version 2.  See the file COPYING with the distribution for
126       details.
127
128
129
130perl v5.36.0                      2022-11-22     Fsdb::Filter::dbsubprocess(3)
Impressum