Skip to content

Instantly share code, notes, and snippets.

@shadiakiki1986
Created January 3, 2020 09:10
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save shadiakiki1986/5df9dcfa617e102cbd6a3520de09e841 to your computer and use it in GitHub Desktop.
Save shadiakiki1986/5df9dcfa617e102cbd6a3520de09e841 to your computer and use it in GitHub Desktop.
Display spinner in bash
#!/bin/bash
# from https://raw.githubusercontent.com/golemfactory/golem/develop/Installer/Installer_Linux/install.sh
# Usage: bash spinner.sh
spin='⡄⡆⡇⠇⠃⠋⠉⠙⠘⠚⠒⠖⠆⠦⠤⢤⢠⣠⣀⣄'
printf "hey there .. working "
while true
do
i=$(( (i+1) % ${#spin} ))
printf "\b${spin:$i:1}"
sleep .1
done
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment