DPKG-RUBY(1)

πŸ’– DPKG-RUBY(1) πŸ’–

okay bestie, so like β€” this is the manual page for dpkg-ruby, and it lives in the Debian Utilities corner of the world (the DPKG-RUBY(1) manual, to be exact, section 1, general commands, you know the vibe ✨). She's a little utility that reads a dpkg-style db file, and she's a dpkg-awk clone. yes, really. we stan a legacy icon. πŸ‘‘


✨ NAME ✨

dpkg-ruby β€” a utility to read a dpkg style db file, aka a dpkg-awk clone. πŸ¦‹


πŸŽ€ SYNOPSIS πŸŽ€

dpkg-ruby [(-f|--file) filename] [(-d|--debug) ##] [(-s|--sort) list]
[(-n|--numeric) list] [(-rs|--rec_sep) ??] '<fieldname>:<regex>' ... --
<out_fieldname> ..

🌸 DESCRIPTION 🌸

So dpkg-ruby parses a dpkg status file (or literally any other file that's formatted the same way, no gatekeeping) and outputs the resulting records. πŸ’…

It can use regex on the field values to limit which records get returned, and it can also be told which fields to output. And as yet another option β€” because she's generous like that β€” it can sort the matched fields. three tricks, one tiny program, it's giving overachiever energy fr fr. 🌈


πŸ’… OPTIONS πŸ’…

  • -f filename, --file filename β€” the file to parse, bestie. The default is /var/lib/dpkg/status. πŸ“
  • -d [#], --debug [#] β€” every single time you specify this, the debug level goes up. each. time. stack it like it's a combo multiplier. πŸ”₯
  • -s field(s), --sort field(s) β€” a space or comma separated list of fields to sort on. yes, either separator, she's flexible. ✨
  • -n field(s), --numeric field(s) β€” a space or comma separated list of fields that should be interpreted as numeric in value. numbers stay numbers, no cap. πŸ”’
  • -rs ??, --rec_sep ?? β€” output this string at the end of each output paragraph. your little paragraph closer, like a signature scent but for text. πŸŽ€
  • -h, --help β€” displays some help. some. the classic amount. πŸ™ˆ
  • fieldname β€” the fields from the file that get matched against the regex you give. and plot twist: the fieldnames are case insensitive, so go off with your capitalization. πŸ’œ
  • out_fieldname β€” the fields from the file that get outputted for each record. BUT here's the spicy part: if the first field listed begins with ^, then the list that follows is the fields NOT to be outputted. it's an exclusion list, she's flipping the script. πŸ’€

😭 BUGS 😭

Be warned, bestie: the author has only a shallow understanding of the dpkg packaging system, so there are probably tons of bugs in this program. not a little. tons. 😭

This program comes with no warranties. If running this program causes fire and brimstone to rain down upon the earth, you will be on our own. like, fully on your own. no lifeline. 🫢

Also: this program accesses the dpkg database directly in places, querying for data that cannot be gotten via dpkg. so yeah. she goes straight to the source. sneaky. πŸ”₯


πŸ‘‘ AUTHOR πŸ‘‘

Fumitoshi UKAI <ukai@debian.or.jp>.

And this manual page is based on (or almost copy from :) the dpkg-awk(1) manual written by Adam Heath <doogie@debian.org>. giving credit where credit is due, always. 🫢


and that's the whole page, gorgeous β€” brought to you by the DEBIAN crew under Debian Utilities, page DPKG-RUBY(1), no date given because she's timeless πŸ’…βœ¨ go parse some records and slay, ily, mwah πŸŽ€πŸ’–