DBROW(1)
π
DBROW(1) β the dbrow page, bestie edition π
okay so real talk: this is dbrow, and it's a user-contributed Perl thing (iykyk πΈ). The whole thing is select rows from an Fsdb file based on arbitrary conditions. That's the vibe. That's the whole assignment. β¨
π NAME π
dbrow β select rows from an Fsdb file based on arbitrary conditions. That's it, that's the girl. π
π¦ SYNOPSIS π¦
dbrow [-vw] CONDITION [CONDITION...]
π DESCRIPTION π
So the way this works is: it selects rows for which all the CONDITIONS are true. All of them. Every single one. No skipping. π₯
Conditions are specified as Perl code, and here's the cute part β you embed column names in them, preceded by underscores. That's the little underscore moment. _fullname, etc. Obsessed. π
β¨ OPTIONS β¨
-vβ inverts the selection, picking rows where at least one condition does not match. Iconic contrarian behavior. π
This module also slays the standard fsdb options, no cap:
-dβ enable debugging output.-wor--warningsβ enable warnings in user supplied code. (Your code. Yes, yours. π«Ά)-ior--inputInputSource β read from InputSource, typically a file name, or-for standard input, or (if in Perl) aIO::Handle,Fsdb::IOorFsdb::BoundedQueueobjects.-oor--outputOutputDestination β write to OutputDestination, typically a file name, or-for standard output, or (if in Perl) aIO::Handle,Fsdb::IOorFsdb::BoundedQueueobjects.--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. main character energy, honestly. β--headerH β use H as the full Fsdb header, rather than reading a header from then input. (That's the original wording, bestie, I'm not touching it. π)--helpβ show help.--manβ show full manual. (Hiiii, you're here! π)
πΈ SAMPLE USAGE πΈ
π Input:
#fsdb account passwd uid gid fullname homedir shell
johnh * 2274 134 John_Heidemann /home/johnh /bin/bash
greg * 2275 134 Greg_Johnson /home/greg /bin/bash
root * 0 0 Root /root /bin/bash
# this is a simple database
π§ Command:
cat DATA/passwd.fsdb | dbrow '_fullname =~ /John/'
π Output:
#fsdb account passwd uid gid fullname homedir shell
johnh * 2274 134 John_Heidemann /home/johnh /bin/bash
greg * 2275 134 Greg_Johnson /home/greg /bin/bash
# this is a simple database
# | /home/johnh/BIN/DB/dbrow
likeβ¦ it literally did that. π
π BUGS π
Doesn't detect references to unknown columns in conditions. ngl that's a lil bit of a yikes, but we move. π¦
Then there's this trailing bit that's just⦠sitting there. Not me questioning it. Keeping it exactly as it is because facts are facts:
END
#' for font-lock mode.
exit 1;
π AUTHOR and COPYRIGHT π
Copyright (C) 1991-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. π«Ά
and that's the whole page, bestie β brought to you by perl v5.32.1, dated 2024-08-02. slay, go filter some rows. πβ¨π
π¦ 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