Created
June 17, 2018 17:30
-
-
Save bitmvr/63698d3d049b8af2b952c19d6204ced5 to your computer and use it in GitHub Desktop.
Animated Pride Flag written in Bash
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 | |
sleepSpeed=0.001 | |
line=$(printf ' %.0s' {1..50}) | |
paintBucket=( '196' '214' '226' '28' '27' '90' ) | |
for paint in "${paintBucket[@]}"; do | |
swipe=1 | |
length=1 | |
while [ $swipe -le 2 ]; do | |
while [ $length -le 50 ]; do | |
printf "\\033[48;5;${paint}m \\033[0m" | |
sleep "${sleepSpeed}" | |
((length++)) | |
done | |
length=1 | |
((swipe++)) | |
printf '\n' | |
done | |
done |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment