Fsdb::F...sv_to_db(3)
okay bestie, welcome to the Fsdb::F...sv_to_db(3) page from the User Contributed Perl Documentation β itβs giving βCSV goes in, fsdb comes out,β and weβre gonna get through it together π
β¨ NAME β¨
csv_to_db β convert comma-separated-value data into fsdb. Thatβs the whole assignment, no cap.
πΈ SYNOPSIS πΈ
csv_to_db <source.csv
π¦ DESCRIPTION π¦
Converts a comma-separated-value data stream to Fsdb format. Literally the main character move of this whole program.
The input is CSV-format (not fsdb, bestie β donβt get it twisted). The first row is taken to be the names of the columns, so that row is doing important label duty.
The output is two-space-separated fsdb. (Someday more general field separators should be supported.) Fsdb fields are a normalized version of the CSV file: spaces are converted to single underscores. Slay, normalization.
π OPTIONS π
-F,--fs,--fieldseparatorSβ Specify the field (column) separator asS. Seedbfilealterfor valid field separators. Default isS(double space).
This module also supports the standard fsdb options:
-dβ Enable debugging output. Detective mode: on.-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)autorun"option controls that behavior within Perl.--helpβ Show help. We love a quick assist.--manβ Show full manual. You are here, bestie.
π SAMPLE USAGE π
π Input:
paper,papertitle,reviewer,reviewername,score1,score2,score3,score4,score5
1,"test, paper",2,Smith,4,4,,,
2,other paper,3,Jones,3,3,,,
π Command:
csv_to_db
π Output:
#fsdb -F S paper papertitle reviewer reviewername score1 score2 score3 score4 score5
1 test, paper 2 Smith 4 4 - - -
2 other paper 3 Jones 3 3 - - -
# | csv_to_db
π₯ SEE ALSO π₯
Go check out Fsdb. And also db_to_csv β the other direction of the pipeline friendship, iykyk.
π CLASS FUNCTIONS π
π§ new
$filter = new Fsdb::Filter::csv_to_db(@arguments);
Create a new csv_to_db object, taking command-line arguments. Fresh object, fresh vibes.
π set_defaults
$filter->set_defaults();
Internal: set up defaults. Somebody has to do the behind-the-scenes work.
π¦ parse_options
$filter->parse_options(@ARGV);
Internal: parse command-line arguments. Reading the room, option-style.
πΈ setup
$filter->setup();
Internal: setup, parse headers. Getting the whole situation organized.
β run
$filter->run();
Internal: run over each rows. Row by row, we move.
π 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.
okay thatβs the whole page, bestie! cute little sign-off: perl v5.32.1, date 2024-08-02, page Fsdb::F...sv_to_db(3) β periodt πβ¨
π¦ 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