DBROWCOUNT(1)
π 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. π₯-ior--inputInputSource β read from InputSource. typically a file name, or-for standard input, or (if you're in Perl) aIO::Handle,Fsdb::IOorFsdb::BoundedQueueobject.-oor--outputOutputDestination β write to OutputDestination. typically a file name, or-for standard output, or (if you're in Perl) aIO::Handle,Fsdb::IOorFsdb::BoundedQueueobject.--autorunor--noautorunβ by default, programs process automatically, butFsdb::Filterobjects in Perl do not run until you invoke therun()method. the--(no)autorunoption 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 π¦
dbcolaccumulate(1)dbcolstats(1)Fsdb(3)
go read them. expand your mind. πΈ
π AUTHOR and COPYRIGHT π
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
- 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