Created
October 8, 2020 19:54
-
-
Save colorfield/4ddfa05ab3d81751ea81d1928f04d477 to your computer and use it in GitHub Desktop.
Standup winner
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 | |
team=("Stephanie" "Dan" "Tish" "Alex" "Blazej" "John" "Mattia" "Christophe" "Maria" "Matt" "Gesche" "Lisa" "Dominic" "Nick" "Jamie" "Thomas" "Vasi" "Inky" "Chris" "Philipp" "Marco" "Beat") | |
suspense=("Picking" "🤔Changing" "😛Cheating") | |
RANDOM=$$$(date +%s) | |
# Get the winner | |
winner=${team[$RANDOM % ${#team[@]} ]} | |
# Produce some suspense | |
for i in "${suspense[@]}" | |
do | |
printf "$i" | |
dots=0 | |
until [ $dots -gt 2 ] | |
do | |
printf "." | |
((dots=dots+1)) | |
sleep .7 | |
done | |
sleep 1 | |
printf '%b\n' | |
done | |
echo "Sounds good this time!" | |
sleep 2 | |
echo "Yay! $winner" 🎉 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment