Skip to content

Instantly share code, notes, and snippets.

@JeremyOttley
Created August 5, 2017 02:05
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 JeremyOttley/844f397631e68d9bc4f526089e997dfa to your computer and use it in GitHub Desktop.
Save JeremyOttley/844f397631e68d9bc4f526089e997dfa to your computer and use it in GitHub Desktop.
sp="/-\|"
sc=0
spin() {
printf "\b${sp:sc++:1}"
((sc==${#sp})) && sc=0
}
endspin() {
printf "\r%s\n" "$@"
}
while true; do
spin
done
#endspin
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment