DBFILES...COMMENTS(1)

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

🌸 DBFILES...COMMENTS(1) 🌸

okay so bestie, this is a page from the User Contributed Perl Documentation collection, and it's about one very specific little icon: dbfilestripcomments. pull up a chair πŸ’–


✨ NAME ✨

dbfilestripcomments β€” the tool that removes comments from a fsdb file. that's it, that's the whole job, and it does it beautifully πŸ’…


πŸŽ€ SYNOPSIS πŸŽ€

dbfilestripcomments [-h]

literally one optional flag, she's low maintenance 🫢


πŸ¦‹ DESCRIPTION πŸ¦‹

so what it does: it removes any comments in a file β€” and yes, that includes the header. 🫧

now, quick vibe check: this makes the file unreadable by other Fsdb utilities, but perhaps more readable by humans. so it's giving "sacrifice for the aesthetic" 😭 trade-off city, but sometimes you just want something a person can actually look at.

and with the -h option? it leaves the header alone. keep the crown, drop the commentary πŸ‘‘


🌈 OPTIONS 🌈

  • -h or --header β€” retain the header. that's it. she protects the header. πŸ›‘οΈ

this module also supports the standard fsdb options, so let's run through the whole squad:

  • -d β€” enable debugging output. for when you need to see what's going on under the hood πŸ”
  • -i or --input InputSource β€” read from InputSource, which is typically a file name, or - for standard input, or (if you're in Perl) a IO::Handle, Fsdb::IO or Fsdb::BoundedQueue object. so many options and every one of them valid ✨
  • -o or --output OutputDestination β€” write to OutputDestination, typically a file name, or - for standard output, or (if you're in Perl) a IO::Handle, Fsdb::IO or Fsdb::BoundedQueue object. same energy, output side πŸ’Œ
  • --autorun or --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. no cap, this one is a Perl thing 🧚
  • --help β€” show help. we love a quick assist πŸŽ€
  • --man β€” show full manual. hi, that's this page, you're here, you made it πŸ‘‹

πŸ“ SAMPLE USAGE πŸ“

Input:

#fsdb -R C      experiment      mean    stddev  pct_rsd conf_range      conf_low       conf_high        conf_pct        sum     sum_squared     min     max     n
experiment:  ufs_mab_sys
mean:        37.25
stddev:      0.070711
pct_rsd:     0.18983
conf_range:  0.6353
conf_low:    36.615
conf_high:   37.885
conf_pct:    0.95
sum:         74.5
sum_squared: 2775.1
min:         37.2
max:         37.3
n:           2

#  | /home/johnh/BIN/DB/dbmultistats experiment duration
#  | /home/johnh/BIN/DB/dblistize

look at all that # noise, honestly iconic but also a lot πŸ™ˆ

Command:

cat data.fsdb | dbfilestripcomments

classic pipe moment, cat into the tool, chef's kiss πŸ§‘β€πŸ³

Output:

experiment:  ufs_mab_sys
mean:        37.25
stddev:      0.070711
pct_rsd:     0.18983
conf_range:  0.6353
conf_low:    36.615
conf_high:   37.885
conf_pct:    0.95
sum:         74.5
sum_squared: 2775.1
min:         37.2
max:         37.3
n:           2

see how the header and every comment line just left? that's the whole glow-up. clean, readable, slay πŸ’…βœ¨


πŸ‘‘ SEE ALSO πŸ‘‘

  • Fsdb.
  • dbcoldefine.

go read those too, bestie, they're in the same universe 🌟


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. πŸ“œ

fr fr, it's GPL v2 β€” check COPYING if you need the fine print, no cap.

and that's the tea 🍡 β€” this page is from the perl v5.32.1 docs, dated 2024-08-02, filed under DBFILES...COMMENTS(1). mwah, bye bestie πŸ’–πŸ¦‹πŸŽ€

πŸ“¦ where this page comes from