Skip to content

Instantly share code, notes, and snippets.

@colorfield
Created October 8, 2020 19:54
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save colorfield/4ddfa05ab3d81751ea81d1928f04d477 to your computer and use it in GitHub Desktop.
Save colorfield/4ddfa05ab3d81751ea81d1928f04d477 to your computer and use it in GitHub Desktop.
Standup winner
#!/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