linux, 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

github

Author: nachoparker

Humbly sharing things that I find useful [ github dockerhub ]

2 Comments on “A progress bar for the shell

Leave a Reply

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