#!/bin/sh # # file: cuckoo # purpose: plays cuckoo the number of times equal to current hour; # fine to run it from cron :-) # created: pasha oct 22 1998 # pending: error handling # #set -x SOUND_FILE=/home/root/cuckoo.au #get hour and bring it to 12-hour format HOUR=`date | cut -b 12-13` if [ $HOUR -gt 12 ] then HOUR=`expr $HOUR - 12` fi #if [ $HOUR -eq 0 ] #then # HOUR=12 #fi #now cuckook $HOUR times while [ $HOUR -ge 1 ] do /usr/bin/audioplay -v 1 $SOUND_FILE HOUR=`expr $HOUR - 1` done exit 0