Skip to content

Instantly share code, notes, and snippets.

@alexggordon
Last active August 29, 2015 14:03
Show Gist options
  • Save alexggordon/db50b4f76cdf48057ff2 to your computer and use it in GitHub Desktop.
Save alexggordon/db50b4f76cdf48057ff2 to your computer and use it in GitHub Desktop.
A bash script to randomly change the volume on a Mac.
#!/bin/bash
ears ()
{
number=$RANDOM
number=$[ $number % 100 ]
osascript -e "set volume output volume $number"
}
i="0"
while [ $i -lt 75 ]
do
ears
i=$[$i+1]
done
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment