dbar(1)

πŸ“¦
version 0.0.20100524 Β· 3 versions
, in debian bookworm, debian trixie, ubuntu noble

✨ dbar(1) ✨

okay so bestie, welcome to the User Commands section of the manual, page dbar(1). sit down, grab a boba, we're doing progress bars today 🫢


🌸 NAME 🌸

dbar β€” it's an ASCII progresbar πŸ’… (yes, that's the spelling in the source, we are not discussing it, the bar itself is iconic regardless)


πŸŽ€ SYNOPSIS πŸŽ€

echo <percentage> | dbar [options] <indicator text>

literally just pipe a number in and watch the little bar go brrr ✨


πŸ’– DESCRIPTION πŸ’–

so here's the tea: dbar lets you define static 0% and 100% marks, or you can define those marks dynamically at runtime. and get this β€” static and dynamic marks can be mixed, no cap. in that case, the value you specify at runtime wins, it has higher priority, main character energy πŸ‘‘

you can specify ranges of numbers, negative, positive, or ranges with a negative min value and a positive max value. all of it. we contain multitudes πŸ¦‹

and the best part: all numbers are treated as double precision floating point, meaning the input is NOT limited to integers. decimals welcome, they're invited to the party πŸ’œ


✨ OPTIONS ✨

  • -l β€” the label to be prepended to the bar (default: "" ). your little name tag for the bar πŸŽ€
  • -nonl β€” no new line, i.e. don't put '\n' at the end of the bar (default: do print "\n"). use this when you want the bar to stay on the same line and vibe with whatever comes next 🫢
  • -max β€” the value to be considered 100% (default: 100). the ceiling, the limit, the final boss 🧚
  • -min β€” the value to be considered 0% (default: 0). the floor, the starting line, the "we begin" πŸ’…
  • -s β€” the symbol representing the percentage value in the meter (default: "="). swap it out if = isn't your aesthetic ✨
  • -w β€” number of charcaters to be considered 100% in the meter (default: 25). that's how wide the whole thing stretches, adjust to taste 🌈

πŸ“ EXAMPLES πŸ“

static 100% mark or single value input 🌸

echo 25 | dbar -max 100 -l text

Output: text  25% [======                   ]

look at her go. text, then 25%, then the bar doing its little thing πŸ’–

if your 100% mark changes dynamically, or 2-values input πŸ’«

echo "50 150" | dbar
      |   |
      |   |__ max value
      |
      |__ value to display

Output: 33% [========                 ]

so you feed it two numbers, and the diagram above is literally telling you which one is which. first one = the value to display, second one = the max value. iykyk 🧚

if your value range is not between [0, maxval], or 3-values input πŸ‘‘

echo "50 -25 150" | dbar
      |   |  |
      |   |  |__ max value 100% mark
      |   |
      |   |_____ min value 0% mark
      |
      |________ value to display

Output: 43% [===========              ]

three numbers, three jobs. value to display, then the min value (0% mark), then the max value (100% mark). and now your range can go negative, slay πŸ’…

multiple runs πŸ”₯

for i in 2 20 50 75 80; do echo $i; sleep 1; done | dbar | dzen2

Output: Find out yourself.

ngl the manual literally said find out yourself and honestly? respect. run it, bestie, it's giving suspense 😭


🌈 ENVIRONMENT 🌈

None. nothing here. empty. the void. πŸ’€


πŸ¦‹ FILES πŸ¦‹

None. also nothing. she's self-contained, she doesn't need files, she's low maintenance 🫢


πŸ‘‘ SEE ALSO πŸ‘‘


πŸ’œ AUTHORS πŸ’œ

the program itself was written by Robert Manea <rob.manea@gmail.com> β€” thank you for this icon, king 🫑

this manual page was written by Jari Aalto <jari.aalto@cante.net> for the Debian GNU system (but may be used by others, sharing is caring). released under license GNU GPL version 2 or (at your option) any later version. for more information about the license, visit <http://www.gnu.org/copyleft/gpl.html> πŸ’–


okay that's the whole page, you're basically a dbar expert now, go forth and pipe things 🌟

dbar Β· version/date stamp: 2022-06-04 Β· page dbar(1) β€” mwah, take care bestie πŸ’…βœ¨

πŸ“¦ where this page comes from