Fsdb::F...alidate(3)
πΈ NAME πΈ
Okay bestie, this is Fsdb::F...alidate(3) from the User Contributed Perl Documentation manual, and it's here to do one iconic job: dbfilevalidate β insure the source input is a well-formed Fsdb file. That's the whole name, no cap. π
β¨ SYNOPSIS β¨
dbfilevalidate [-vc]
π DESCRIPTION π
So basically, dbfilevalidate validates the input file to make sure it is a well-formed fsdb file. If the file is well-formed, it outputs the whole file and exits with a good exit code. For invalid files, it exits with an error exit code and embedded error messages in the stream as comments with *** in them. π
Currently this program checks for rows with missing or extra columns. Periodt.
π OPTIONS π
-v,--errors-onlyβ output only broken lines, not the whole thing. Lowkey useful when you just want the messy bits.-c,--correctβ correct errors, if possible. Pad out rows with the empty value; truncate rows with extra values. If errors can be corrected the program exits with a good return code. Slay.-e E,--empty Eβ give valueEas the value for empty (null) records.
This module also supports the standard fsdb options:
-dβ enable debugging output.-i,--inputInputSourceβ read fromInputSource, typically a file name, or-for standard input, or (if in Perl) aIO::Handle,Fsdb::IOorFsdb::BoundedQueueobjects.-o,--outputOutputDestinationβ write toOutputDestination, typically a file name, or-for standard output, or (if in Perl) aIO::Handle,Fsdb::IOorFsdb::BoundedQueueobjects.--autorun,--noautorunβ by default, programs process automatically, butFsdb::Filterobjects in Perl do not run until you invoke therun()method. The--(no)autorunoption controls that behavior within Perl.--helpβ show help.--manβ show full manual.
π¦ SAMPLE USAGE π¦
Input
#fsdb sid cid
1 10
2
1 12
2 12
Command
cat TEST/dbfilevalidate_ex.in | dbvalidate
Output
#fsdb sid cid
1 10
2
# *** line above is missing field cid.
1 12
2 12
# | dbfilevalidate
π SEE ALSO π
Fsdb.
π CLASS FUNCTIONS π
new
$filter = new Fsdb::Filter::dbfilevalidate(@arguments);
Create a new dbfilevalidate object, taking command-line arguments. π«Ά
set_defaults
$filter->set_defaults();
Internal: set up defaults.
parse_options
$filter->parse_options(@ARGV);
Internal: parse command-line arguments.
setup
$filter->setup();
Internal: setup, parse headers.
run
$filter->run();
Internal: run over each rows.
finish
$filter->finish();
Internal: write trailer.
π AUTHOR and COPYRIGHT π
Copyright (C) 1991-2008 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.
Catch you later, bestie π«Ά β this one's from the perl v5.32.1 docs, dated 2024-08-02.
π¦ where this page comes from
- epel 9: perl-Fsdb 2:3.9-1.el9 Β· GPLv2
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms