inform_progress

Name

inform_progress  --  draw a spinner to stdout

Synopsis

inform_progress

Description

inform_progress draws a spinner to stdout to inform progress. Use it to indicate activity for processing that takes relatively long time to complete.

If stdout is not a tty or --no-spinner is given to the script, output from inform_progress will be supressed.

Caveats

To make the spinner actually spin inform_progress must be called several times in a row and nothing else should be written to stdout between the calls.

Example

Show a spinner while user is waiting for a loop to finish:

    inform -n "Loopin'... "
    count=0
    while [ "$count" -lt 1000 ]; do
            inform_progress
            count=$(($count + 1))
    done
    inform_done
    

See Also

inform_done(3), inform_failed(3)