This repository contains examples of progress indicators for shell scripts, including a spinner and a progress bar. These tools are useful for visualizing the progress of long-running tasks in Bash or Zsh.
- π Spinner: Displays a rotating spinner while a background task is running.
- π Progress Bar: Shows a progress bar that updates as tasks complete.
- β Compatible with Bash and Zsh on macOS and Linux.
The spinner.sh script runs a spinner while a background task executes.
./spinner.shExample output:
[β] Calling function returning 0
[β] Calling function returning 1 (failed)
The progress_bar.sh script supports running multiple commands with progress tracking.
./progress_bar.shExample output:
=== Continue on failure ===
[##########################] 100% (4/4)
All tasks complete. 3 succeeded, 1 failed.
=== Stop on failure ===
[######## ] 50% (2/4)
Stopping early due to failure: abc C
MIT License