1Fsdb::Filter::dbcol(3)User Contributed Perl DocumentationFsdb::Filter::dbcol(3)
2
3
4

NAME

6       dbcol - select columns from an Fsdb file
7

SYNOPSIS

9       dbcol [-v] [-e -] [column...]
10

DESCRIPTION

12       Select one or more columns from the input database.  If a value is
13       given for empty columns with the -e option, then any named columns
14       which don't exist will be created.  Otherwise, non-existent columns are
15       an error.
16
17       Note:  a safer way to create columns is dbcolcreate.
18

OPTIONS

20       -r or --relaxed-errors
21           Relaxed error checking: ignore columns that aren't there.
22
23       -v or --invert-match
24           Output all columns except those listed (like grep -v).
25
26       -e EmptyValue or --empty
27           Specify the value newly created columns get.
28
29       and the standard fsdb options:
30
31       -d  Enable debugging output.
32
33       -i or --input InputSource
34           Read from InputSource, typically a file, or - for standard input,
35           or (if in Perl) a IO::Handle, Fsdb::IO or Fsdb::BoundedQueue
36           objects.
37
38       -o or --output OutputDestination
39           Write to OutputDestination, typically a file, or - for standard
40           output, or (if in Perl) a IO::Handle, Fsdb::IO or
41           Fsdb::BoundedQueue objects.
42
43       --autorun or --noautorun
44           By default, programs process automatically, but Fsdb::Filter
45           objects in Perl do not run until you invoke the run() method.  The
46           "--(no)autorun" option controls that behavior within Perl.
47
48       --header H
49           Use H as the full Fsdb header, rather than reading a header from
50           then input.
51
52       --help
53           Show help.
54
55       --man
56           Show full manual.
57

SAMPLE USAGE

59   Input:
60           #fsdb account passwd uid gid fullname homedir shell
61           johnh * 2274 134 John_Heidemann /home/johnh /bin/bash
62           greg * 2275 134 Greg_Johnson /home/greg /bin/bash
63           root * 0 0 Root /root /bin/bash
64           # this is a simple database
65
66   Command:
67           cat DATA/passwd.fsdb account | dbcol account
68
69   Output:
70           #fsdb      account
71           johnh
72           greg
73           root
74           # this is a simple database
75           #  | dbcol account
76

SEE ALSO

78       dbcolcreate(1), Fsdb(3)
79

CLASS FUNCTIONS

81   new
82           $filter = new Fsdb::Filter::dbcol(@arguments);
83
84       Create a new dbcol object, taking command-line arguments.
85
86   set_defaults
87           $filter->set_defaults();
88
89       Internal: set up defaults.
90
91   parse_options
92           $filter->parse_options(@ARGV);
93
94       Internal: parse options
95
96   setup
97           $filter->setup();
98
99       Internal: setup, parse headers.
100
101   run
102           $filter->run();
103
104       Internal: run over all data rows.
105
106   finish
107           $filter->finish();
108
109       Internal: write trailer.
110
112       Copyright (C) 1991-2018 by John Heidemann <johnh@isi.edu>
113
114       This program is distributed under terms of the GNU general public
115       license, version 2.  See the file COPYING with the distribution for
116       details.
117
118
119
120perl v5.30.0                      2019-09-19            Fsdb::Filter::dbcol(3)
Impressum