Skip to content

Code-Samples-Galore/Shell-Progress-Indicator

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

1 Commit
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

⏳ Shell Progress Indicators

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.

πŸ“œ Features

  • πŸŒ€ 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.

πŸš€ Usage

πŸŒ€ Spinner

The spinner.sh script runs a spinner while a background task executes.

./spinner.sh

Example output:

[βœ”] Calling function returning 0
[βœ–] Calling function returning 1 (failed)

πŸ“Š Progress Bar

The progress_bar.sh script supports running multiple commands with progress tracking.

./progress_bar.sh

Example 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

πŸ“„ License

MIT License

About

Examples of progress indicators for shell scripts.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages