Created
May 23, 2013 21:02
-
-
Save pplantinga/5639393 to your computer and use it in GitHub Desktop.
Want to set an alarm via OS X terminal? It's easy, just use this!
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 | |
# Simple script for setting an alarm on Mac OS X | |
# Arguments are ./alarm.sh {hour} {minute} | |
until [ `date "+%H"` -eq $1 ] && [ `date "+%M"` -eq $2 ]; do | |
sleep 10 | |
done | |
osascript -e 'set volume 7' | |
say -v Trinoids "WARNING WARNING WARNING" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
On an Ubuntu-flavored machine, the last two lines could be changed to:
Though no promises that it works on your particular machine.