Created
November 16, 2017 12:32
-
-
Save cuotos/e800dff478abfbc61276e3bb50354a24 to your computer and use it in GitHub Desktop.
Rotating Cursor
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
#!/bin/bash | |
# Written by Locutus for bash demonstration. | |
rotateCursor() | |
{ | |
case $toggle | |
in | |
1) | |
echo -n $1" \ " | |
echo -ne "\r" | |
toggle="2" | |
;; | |
2) | |
echo -n $1" | " | |
echo -ne "\r" | |
toggle="3" | |
;; | |
3) | |
echo -n $1" / " | |
echo -ne "\r" | |
toggle="4" | |
;; | |
*) | |
echo -n $1" - " | |
echo -ne "\r" | |
toggle="1" | |
;; | |
esac | |
} | |
while [ 0 ] | |
do | |
rotateCursor " Spinning around happily" | |
sleep 1 | |
done |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment