hi,
im trying to write a unix shell script that is a reminder alert which will popup, which reminds me of important dates .e.g birthday, christmas etc..
anybody know how i might do this?? or any links to a website would be awsome!
Unix shell script help?
The utility you are looking for is cron, the scheduling daemon. Read about cron in the man pages.
Reply:Since I personally find phone calls to be a more effectively jarring reminder method (more so than other alarms), I've found this script to be useful. I usually schedule it using a unix at command (as described in this hint), but you could cron it, or use some other scheduling technique.
Here's the script:
#!/bin/sh
# Tell Skype to dial a number
if [ -z "$1" ]
then
echo "usage: skypecall PHONE_NUMBER"
exit 65
fi
until [ -z "$1" ]
do
osascript -l AppleScript -e "tell application "Skype" to get URL "callto://$1""
shift
done %26amp;
sleep 59
killall -m "Skype"
exit 0
I've saved the script as skypecall (and chmod 755'd it). The command line syntax is: skypecall +643608990(or whatever number you would use to get Skype to normally work). The sleep 59 line insures that the Skype phone call doesn't stay open indefinitely, burning through your SkypeOut minutes. It forces Skype to quit after 59 seconds. Very ugly, but effective.
or
In Panther, there is now a say command line tool. Type say "hello" and it will be said. In Jaguar, you could do this with osascript and the AppleScript "say" command, but this is a little simpler and cleaner.
This can also be used to read a file with the -f parameter, and to write to an AIFF sound file (-o option, useful for, say creating a spoken version of a file to go to your iPod). You can also choose the voice (-v parameter); see the man say page for more details.
see this :
http://www.shelldorado.com/newsletter/is...
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment