dbcol - select columns from an Fsdb file
dbcol [-v] [-e -] [column...]
Select one or more columns from the input database. If a value is given for empty columns with the -e option, then any named columns which don't exist will be created. Otherwise, non-existent columns are an error.
Note: a safer way to create columns is dbcolcreate.
Relaxed error checking: ignore columns that aren't there.
Output all columns except those listed (like grep -v).
Output all columns, in addition to those listed. (Thus -a foo will move column foo to the first column.)
-a foo
Specify the value newly created columns get.
Save output writer (for integration with other fsdb filters).
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 or Fsdb::BoundedQueue objects.
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
Use H as the full Fsdb header, rather than reading a header from then input.
Show help.
Show full manual.
#fsdb account passwd uid gid fullname homedir shell johnh * 2274 134 John_Heidemann /home/johnh /bin/bash greg * 2275 134 Greg_Johnson /home/greg /bin/bash root * 0 0 Root /root /bin/bash # this is a simple database
cat DATA/passwd.fsdb account | dbcol account
#fsdb account johnh greg root # this is a simple database # | dbcol account
dbcolcreate(1), Fsdb(3)
$filter = new Fsdb::Filter::dbcol(@arguments);
Create a new dbcol 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();
Internal: write trailer.
Copyright (C) 1991-2022 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.