Bootstrap FreeKB - Bash (Scripting) - How to show loading bar in Bash shell script
Bash (Scripting) - How to show loading bar in Bash shell script

Updated:   |  Bash (Scripting) articles

The following markup can be used to show a loading bar for 20 seconds in a bash shell script.

#!/bin/bash

i=1
while [ $i -le 20 ]
do
    echo -n "."
    i=$(expr $i + 1)
    sleep 1
done

 




Did you find this article helpful?

If so, consider buying me a coffee over at Buy Me A Coffee



Comments


Add a Comment


Please enter 4fc821 in the box below so that we can be sure you are a human.