DB_TO_CSV(1)
π db_to_csv(1) β like, the manual page, bestie β¨
Okay so real quick: this is db_to_csv, and it lives in section 1 of the manual (the user commands one π«Ά). Perl's own doc tooling ships it under "User Contributed Perl Documentation," which is exactly as glamorous as it sounds. Let's get into it.
πΈ NAME πΈ
db_to_csv β it converts fsdb into the comma-separated-value file format. That's the whole gig. Iconic, focused, no notes. π
β¨ SYNOPSIS β¨
db_to_csv [-C]
That's it. That's the whole invocation. One optional flag. Main character energy honestly. π
π¦ DESCRIPTION π¦
So you've got an fsdb file just sitting there, and you want it as comma-separated values instead? Say less. db_to_csv converts an existing fsdb file into comma-separated value format. Slay.
- Input is fsdb format. That's the vibe it eats. π
- Output is CSV-format plain text β and heads up, it is not fsdb. It's a whole different format, okay? Don't come for me. π
π OPTIONS π
-Cor<--omit-comments>β also strips out all the comments. Every last one. Gone. Bye bestie. π
Also, this module supports all the standard fsdb options, which I will now list in full because I would never leave you hanging:
-dβ turns on debugging output. For when you're like "why is this happening" and you need the receipts. π₯-ior--inputInputSource β reads from InputSource. Usually that's a file name, or-for standard input, or (if you're in Perl)IO::Handle,Fsdb::IOorFsdb::BoundedQueueobjects. Flexible queen. π-oor--outputOutputDestination β writes to OutputDestination. Usually a file name, or-for standard output, or (if you're in Perl)IO::Handle,Fsdb::IOorFsdb::BoundedQueueobjects. Same energy, output side. π--autorunor--noautorunβ by default, programs just process automatically, no prompting. ButFsdb::Filterobjects in Perl do not run until you invoke therun()method. This option controls that behavior within Perl. So like, the vibes differ depending on whether you're in Perl or not. Ngl, important. β--helpβ shows help. Short and sweet. π«Ά--manβ shows the full manual. Hi, you're reading it. π
π SAMPLE USAGE π
π Input:
#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 - - -
2 input double space 3 Jones 3 3 - - -
# | csv_to_db
π Command:
cat data.fsdb | db_to_csv
π¦ Output:
paper,papertitle,reviewer,reviewername,score1,score2,score3,score4,score5
1,"test, paper",2,Smith,4,4,-,-,-
2,"other paper",3,Jones,3,3,-,-,-
2,"input double space",3,Jones,3,3,-,-,-
# | csv_to_db
# | db_to_csv
Notice how "test, paper" and "other paper" and "input double space" get quoted because they've got commas and spaces in them? That's the CSV format doing its thing. Chef's kiss. π
π SEE ALSO π
Fsdb. dbfilealter. csv_to_db β that last one's the round trip, iykyk. π
π AUTHOR and COPYRIGHT π
Copyright (C) 2007-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. π
Fr fr, that's the whole page. Nothing skipped, nothing invented. Periodt. π
Okay bye bestie β this gem came from perl v5.32.1 and got stamped 2024-08-02, so if you're citing it, that's your receipt. πβ¨π
π¦ 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