Skip to content

Instantly share code, notes, and snippets.

@swateek
Created October 29, 2020 05:34
Show Gist options
  • Save swateek/38f48292bd7aeb49180d395a9c436866 to your computer and use it in GitHub Desktop.
Save swateek/38f48292bd7aeb49180d395a9c436866 to your computer and use it in GitHub Desktop.
A Progress Bar in Shell Script
#!/usr/bin/bash
echo -ne "[#] 10%\r"
sleep 1
echo -ne "[##] 20%\r"
sleep 1
echo -ne "[###] 30%\r"
sleep 1
echo -ne "[####] 40%\r"
sleep 1
echo -ne "[#####] 50%\r"
sleep 1
echo -ne "[######] 60%\r"
sleep 1
echo -ne "[#######] 70%\r"
sleep 1
echo -ne "[########] 80%\r"
sleep 1
echo -ne "[#########] 90%\r"
sleep 1
echo -ne "[##########] 100%\r"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment