dbcolneaten - pretty-print columns of Fsdb data (assuming a monospaced font)
dbcolneaten [-E] [field_settings]
dbcolneaten arranges that the Fsdb data appears in neat columns if you view it with a monospaced font. To do this, it pads out each field with spaces to line up the next field.
Field settings are of the form
field op value
OP is >=, =, or <= specifying that the width of that FIELD must be more, equal, or less than that VALUE
dbcolneaten runs in O(1) memory but disk space proportional to the size of data.
Omit padding for the last column (at the end-of-the-line). (Default behavior.)
Do padding and include an extra field separator after the last column. (Useful if you're interactively adding a column.)
This module also supports the standard fsdb options:
Enable debugging output.
Read from InputSource, typically a file name, or - for standard input, or (if in Perl) a IO::Handle, Fsdb::IO or Fsdb::BoundedQueue objects.
-
Write to OutputDestination, typically a file name, 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 fullname homedir uid gid Mr._John_Heidemann_Junior /home/johnh 2274 134 Greg_Johnson /home/greg 2275 134 Root /root 0 0 # this is a simple database # | dbcol fullname homedir uid gid
dbcolneaten
#fsdb -F s fullname homedir uid gid Mr._John_Heidemann_Junior /home/johnh 2274 134 Greg_Johnson /home/greg 2275 134 Root /root 0 0 # this is a simple database # | dbcol fullname homedir uid gid # | dbcolneaten
Does not handle tab separators correctly.
Fsdb.
$filter = new Fsdb::Filter::dbcolneaten(@arguments);
Create a new dbcolneaten object, taking command-line arguments.
$filter->set_defaults();
Internal: set up defaults.
$filter->parse_options(@ARGV);
Internal: parse command-line arguments.
$filter->setup();
Internal: setup, parse headers.
$filter->format_header($out)
Format the header for the current object to output stream $out.
$out
$filter->run();
Scan the data once, then rewrite it neatly.
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.