Last active
September 22, 2015 01:57
-
-
Save zjrosen1/2e7db8abe8956ea40113 to your computer and use it in GitHub Desktop.
Random Forturne
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 | |
function rnum { | |
echo $((RANDOM % $1)) | |
} | |
COWS=("bong" "unipony" "sodomized" "head-in" "vader" "elephant" "tux") | |
VOICES=("Daniel" "Karen") | |
TIMER=10 | |
audio=1 | |
while : | |
do | |
clear | |
VOICE=${VOICES[$(rnum ${#VOICES[@]})]} | |
COW=${COWS[$(rnum ${#COWS[@]})]} | |
FORTUNE=`fortune -s -o` | |
if [[ $audio == 1 ]]; then | |
echo $FORTUNE | toilet --font future | lolcat | |
#echo $FORTUNE | cowsay -f $COW | lolcat | |
audio=0 | |
else | |
echo $FORTUNE | cowsay -f $COW | lolcat | |
say -v $VOICE $FORTUNE | |
audio=1 | |
fi | |
sleep $TIMER | |
done |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment