Created
October 5, 2022 22:12
-
-
Save kfatehi/79d0a53f6fdb75e1c3639335c4675f09 to your computer and use it in GitHub Desktop.
ascii dance script
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
B=' o \ o / _ o __| \ / |__ o _ \ o / o ' | |
C='/|\ | /\ ___\o \o | o/ o/__ /\ | /|\' | |
D='/ \ / \ | \ /) | ( \ /o\ / ) | (\ / | / \ / \' | |
E='55555555556666668888888777777555557777777766666666666677777775555' | |
P=0 | |
function dance() { | |
if [ $P -ge ${#B} ]; then | |
P=0 | |
fi | |
N=${E:$P:1} | |
echo "${B:$P:$N}" | |
echo "${C:$P:$N}" | |
echo "${D:$P:$N}" | |
P=$((P+N)) | |
} | |
dance | |
sleep 0.5 | |
dance | |
sleep 0.5 | |
dance | |
sleep 0.5 | |
dance | |
sleep 0.5 | |
dance | |
sleep 0.5 | |
dance | |
sleep 0.5 | |
dance | |
sleep 0.5 | |
dance | |
sleep 0.5 | |
dance | |
sleep 0.5 | |
dance | |
sleep 0.5 | |
dance | |
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
bash dance.sh | |
o | |
/|\ | |
/ \ | |
\ o / | |
| | |
/ \ | |
_ o | |
/\ | |
| \ | |
___\o | |
/) | | |
__| | |
\o | |
( \ | |
\ / | |
| | |
/o\ | |
|__ | |
o/ | |
/ ) | |
o/__ | |
| (\ | |
o _ | |
/\ | |
/ | | |
\ o / | |
| | |
/ \ |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment