linux, OYB software, shell

A progress bar for the shell

I would like to share this little shell function that I wrote to spice up my shell scripts. It is a simple progress bar that you can launch for a number of seconds, to get an idea of how long there is still to wait.

It uses partial Unicode blocks to achieve subcharacter precision.


Include the function in your code, or source the file

You can use  time on a long task to get the duration, and then


Clone the code

Include the function in your code, or source the file.

You can also add it to your .zshrc or .bashrc to use it as any other command.

It requires a terminal session with unicode locales, for instance you might have in your .zshrc


You can play around with the INT parameter for more smoothness.


Author: nachoparker

Humbly sharing things that I find useful [ github dockerhub ]

6 Comments on “A progress bar for the shell

  1. This is great. I’m a little new to shell scripting so I have a newbie question: how would I incorporate this into a function? Any chance you could point me to a basic example so I can experiment with this?

      1. You don’t actually need to say “function” in BASH. The following will do:
        progress_bar () {

Leave a Reply

Your email address will not be published. Required fields are marked *