Fsdb::F...alidate(3)

πŸ“¦
version 3.9 Β· 3 versions
, in epel 9

🌸 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 value E as the value for empty (null) records.

This module also supports the standard fsdb options:

  • -d β€” enable debugging output.
  • -i, --input InputSource β€” read from InputSource, typically a file name, or - for standard input, or (if in Perl) a IO::Handle, Fsdb::IO or Fsdb::BoundedQueue objects.
  • -o, --output OutputDestination β€” write to OutputDestination, typically a file name, or - for standard output, or (if in Perl) a IO::Handle, Fsdb::IO or Fsdb::BoundedQueue objects.
  • --autorun, --noautorun β€” 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.
  • --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.

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