Tuesday, May 3, 2011

Setting House Clocks after Power Outage

My power went out yesterday. I wanted a quick way to set all the house clocks accurately and easily.


I used the Mac's speech ability and scriptability to make a quick talking clock. I ran this script and turned up my speakers and set all the clocks in the house with ease:
 while [ 1 ];do z=`date +%S`;if [ `expr $z % 5` -eq 0 ];then say `date "+%l %M and %S seconds"`;fi;done 
Paste into a terminal window and press enter. Type Control+C to quit.

[crarko adds: I tested this, and it works as described. Note that this is bash shell syntax; if you use a different shell you may need to modify the script accordingly. I give it an A for cleverness.]

Add to digg Add to Reddit Add to Slashdot Email this Article Add to StumbleUpon

Source: http://feeds.macosxhints.com/click.phdo?i=a728558ed66b06d7e24d266653ba2083

iwork 09 mac store refurbished apple news apple breaking news mac tablet news imac mac tech news macworld 2009

No comments:

Post a Comment