Created
September 1, 2014 08:49
-
-
Save lyuboraykov/707922a7f5abe8f9448f to your computer and use it in GitHub Desktop.
Loading console animation.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env bash | |
LOADING_SYMBOLS=("\\" "|" "/" "-") | |
INDEX=0 | |
while true; do | |
INDEX=$(bc <<< "($INDEX + 1)%4") | |
echo -ne "${LOADING_SYMBOLS[$INDEX]} \033[0K\r" | |
done |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment