1Fsdb::Filter::dbcoltypeU(s3e)r Contributed Perl DocumentaFtsidobn::Filter::dbcoltype(3)
2
3
4
6 dbcoltype - define (or redefine) types for columns of an Fsdb file
7
9 dbcol [-v] [column type...]
10
12 Define the type of each column, where COLUMN and TYPE are pairs. Or,
13 with the "-v" option, redefine all types as string.
14
15 The data does not change (just the header).
16
18 -v or --clear-types
19 Remove definitions from columns that are listed, or from all
20 columns if none are listed. The effect is to restore types to
21 their default type of "a" (string).
22
23 and the standard fsdb options:
24
25 -d Enable debugging output.
26
27 -i or --input InputSource
28 Read from InputSource, typically a file, or - for standard input,
29 or (if in Perl) a IO::Handle, Fsdb::IO or Fsdb::BoundedQueue
30 objects.
31
32 -o or --output OutputDestination
33 Write to OutputDestination, typically a file, or - for standard
34 output, or (if in Perl) a IO::Handle, Fsdb::IO or
35 Fsdb::BoundedQueue objects.
36
37 --autorun or --noautorun
38 By default, programs process automatically, but Fsdb::Filter
39 objects in Perl do not run until you invoke the run() method. The
40 "--(no)autorun" option controls that behavior within Perl.
41
42 --header H
43 Use H as the full Fsdb header, rather than reading a header from
44 then input.
45
46 --help
47 Show help.
48
49 --man
50 Show full manual.
51
53 Input:
54 #fsdb account passwd uid gid fullname homedir shell
55 johnh * 2274 134 John_Heidemann /home/johnh /bin/bash
56 greg * 2275 134 Greg_Johnson /home/greg /bin/bash
57 root * 0 0 Root /root /bin/bash
58 # this is a simple database
59
60 Command:
61 cat DATA/passwd.fsdb account | dbcoltype uid l gid l
62
63 Output:
64 #fsdb account passwd uid:l gid:l fullname homedir shell
65 johnh * 2274 134 John_Heidemann /home/johnh /bin/bash
66 greg * 2275 134 Greg_Johnson /home/greg /bin/bash
67 root * 0 0 Root /root /bin/bash
68 # this is a simple database
69
71 dbcoldefine(1), dbcolcreate(1), Fsdb(3).
72
74 new
75 $filter = new Fsdb::Filter::dbcoltype(@arguments);
76
77 Create a new dbcoltype object, taking command-line arguments.
78
79 set_defaults
80 $filter->set_defaults();
81
82 Internal: set up defaults.
83
84 parse_options
85 $filter->parse_options(@ARGV);
86
87 Internal: parse options
88
89 setup
90 $filter->setup();
91
92 Internal: setup, parse headers.
93
94 run
95 $filter->run();
96
97 Internal: run over all data rows.
98
99 finish
100 $filter->finish();
101
102 Internal: write trailer.
103
105 Copyright (C) 2022 by John Heidemann <johnh@isi.edu>
106
107 This program is distributed under terms of the GNU general public
108 license, version 2. See the file COPYING with the distribution for
109 details.
110
111
112
113perl v5.38.0 2023-07-20 Fsdb::Filter::dbcoltype(3)