Skip to content

Instantly share code, notes, and snippets.

@kitsuyui
Created January 16, 2015 16:05
Show Gist options
  • Save kitsuyui/5a996396995cd45d05dc to your computer and use it in GitHub Desktop.
Save kitsuyui/5a996396995cd45d05dc to your computer and use it in GitHub Desktop.
OS X の say コマンドで延々と 2 桁かける 1 桁の掛け算をしゃべり続けるスクリプト ref: http://qiita.com/kitsuyui/items/d867007d01fa69617861
#!/usr/bin/env bash
while true ;
do
a=$(( $RANDOM % 9 + 1 ))$(( $RANDOM %9 + 1 ))
b=$(( $RANDOM % 8 + 2 ))
c=$(( a * b ))
say -v Kyoko "$a 、かける、 $b 。わ"
sleep 2
say -v Kyoko "$c"
sleep 1
done
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment