DBROWCOUNT(1)

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

πŸ’… DBROWCOUNT(1) β€” the count-your-rows girlies' manual ✨

ok so real talk: this is a page from the User Contributed Perl Documentation section of the manual, and it's about a tiny little icon named dbrowcount. she's small. she's one job. she ate. πŸŽ€


🌸 NAME 🌸

dbrowcount β€” literally just counts the number of rows in an Fsdb stream. that's it. that's the whole personality. πŸ¦‹


✨ SYNOPSIS ✨

dbrowcount

no args, no drama, no cap. she takes it from stdin and gives you a number. πŸ’…


πŸ’– DESCRIPTION πŸ’–

okay bestie, here's the vibe: dbrowcount counts the number of rows and writes out a new fsdb file with exactly one column (n) and one value β€” the number of rows. that's the tea. πŸ“

and like, lowkey important detail: this program is a strict subset of dbcolstats. like, she's the little sister. same energy, way less to say for herself.

now, you could get a row count other ways β€” dbcolstats, or dbrowaccumulate -C 1 plus some processing β€” but counting is so common that it genuinely warrants its own command. think about how often wc -l shows up in regular shell scripting. yeah. exactly. it's giving "essential utility." πŸ‘‘

but here's the part where I have to be honest with you, because there are some gross and subtle differences, fr fr: dbrowcount doesn't require you to specify a column to search, and it also doesn't look for and skip null data items. that's the whole contrast. remember it. 🫢


🧚 OPTIONS 🧚

No program-specific options. she's low maintenance. ngl kind of iconic of her.

this module also supports the standard fsdb options, though:

  • -d β€” enable debugging output. turn it on if something's acting sus. πŸ”₯
  • -i or --input InputSource β€” read from InputSource. typically a file name, or - for standard input, or (if you're in Perl) a IO::Handle, Fsdb::IO or Fsdb::BoundedQueue object.
  • -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.
  • --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. iykyk. πŸ’€
  • --help β€” show help. 🫢
  • --man β€” show the full manual. like, the whole thing. this one. hi. πŸ’œ

🌈 SAMPLE USAGE 🌈

⭐ Input:

#fsdb      absdiff
0
0.046953
0.072074
0.075413
0.094088
0.096602
#  | /home/johnh/BIN/DB/dbrow
#  | /home/johnh/BIN/DB/dbcol event clock
#  | dbrowdiff clock
#  | /home/johnh/BIN/DB/dbcol absdiff

⭐ Command:

cat data.fsdb | dbrowcount

⭐ Output:

#fsdb n
6
#  | /home/johnh/BIN/DB/dbrow
#  | /home/johnh/BIN/DB/dbcol event clock
#  | dbrowdiff clock
#  | /home/johnh/BIN/DB/dbcol absdiff

πŸŽ€ Input 2:

as another example, this input produces the same output as above in dbrowcount, but different output in dbstats:

#fsdb      absdiff
-
-
-
-
-
-
#  | /home/johnh/BIN/DB/dbrow
#  | /home/johnh/BIN/DB/dbcol event clock
#  | dbrowdiff clock
#  | /home/johnh/BIN/DB/dbcol absdiff

like, six rows either way, but those null items hit different depending on who's asking. πŸ™ˆ


πŸ¦‹ SEE ALSO πŸ¦‹

go read them. expand your mind. 🌸


Copyright (C) 2007-2022 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. πŸ’–


ok that's the whole page bestie, no notes. go count some rows. ✨

and finally, the little sign-off: this beauty is from perl v5.32.1, dated 2024-08-02, and you found her under DBROWCOUNT(1). mwah. πŸ’‹πŸ§šβ€β™€οΈ

πŸ“¦ where this page comes from