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.

Usage

Include the function in your code, or source the file

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

Installation

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

Configuration

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

Code

Author: nachoparker

Humbly sharing things that I find useful [ github dockerhub ]

5 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?

Leave a Reply

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