The progress meter box (gauge)

The progress meter displays a meter at the bottom of the box. This meter indicates the percentage of the process completed. New percentages are read from standard input, one integer per line. This meter is updated to reflect each new percentage.

Let's write the shell script to create a progress meter as follows:

declare -i COUNTER=1 
    while test $COUNTER -le 100 
            echo $COUNTER 
            sleep 1 
    } |  dialog --gauge  "This is a progress bar"  10 50 0 

Let's test the following program:

    $ chmod +x
    $ ./


Customization of dialog with the configuration ...

Get Learning Linux Shell Scripting - Second Edition now with O’Reilly online learning.

O’Reilly members experience live online training, plus books, videos, and digital content from 200+ publishers.