Sillyness at The Terminal
Here’s a silly Terminal trick for giggles. For those of you who know what you’re doing just grab the first block of code and put it in your .profile, .bashrc or wherever. For the rest of you here’s a step by step guide to creepy fun.
First copy this code to your clipboard:
function sayslow () {
phrase=$1; #import
osascript <<EOT
say "{$phrase}" speaking rate 10 pitch 1
EOT
}
Now open Terminal and type:
pico .profile
Hit Control-V until you are at the bottom of the file and then paste the code you copied to your clipboard. Hit Control-X followed by Y and RETURN.
You’ve just add a new command which will give you no end to entertainment. :)
Now close your Terminal window and open a new one by typing Control-N. At the command line type:
sayslow "your phrase"
Where “your phrase” is anything you want your computer to say. Note: avoid using single or double quotes as these will just screw things up. Also note: This has only been tested under Snow Leopard.