#!/bin/bash MIN=$(date +"%M") HR=$(date +"%H") INTRO="The time is, " case $MIN in "00") MIN="o'clock";; "01") MIN="Oh - one";; "02") MIN="Oh - two";; "03") MIN="Oh - three";; "04") MIN="Oh - four";; "05") MIN="Oh - five";; "06") MIN="Oh - six";; "07") MIN="Oh - seven";; "08") MIN="Oh - eight";; "09") MIN="Oh - nine";; "10") MIN="ten";; "11") MIN="eleven";; "12") MIN="twelve";; "13") MIN="thirteen";; "14") MIN="fourteen";; "15") MIN="fifteen";; "16") MIN="sixteen";; "17") MIN="seventeen";; "18") MIN="eighteen";; "19") MIN="nineteen";; "20") MIN="twenty";; "21") MIN="twenty one";; "22") MIN="twenty two";; "23") MIN="twenty three";; "24") MIN="twenty four";; "25") MIN="twenty five";; "26") MIN="twenty six";; "27") MIN="twenty seven";; "28") MIN="twenty eight";; "29") MIN="twenty nine";; "30") MIN="thirty";; "31") MIN="thirty one";; "32") MIN="thirty two";; "33") MIN="thirty three";; "34") MIN="thirty four";; "35") MIN="thirty five";; "36") MIN="thirty six";; "37") MIN="thirty seven";; "38") MIN="thirty eight";; "39") MIN="thirty nine";; "40") MIN="forty";; "41") MIN="forty one";; "42") MIN="forty two";; "43") MIN="forty three";; "44") MIN="forty four";; "45") MIN="forty five";; "46") MIN="forty six";; "47") MIN="forty seven";; "48") MIN="forty eight";; "49") MIN="forty nine";; "50") MIN="fifty";; "51") MIN="fifty one";; "52") MIN="fifty two";; "53") MIN="fifty three";; "54") MIN="fifty four";; "55") MIN="fifty five";; "56") MIN="fifty six";; "57") MIN="fifty seven";; "58") MIN="fifty eight";; "59") MIN="fifty nine";; *) echo "error with minute $MIN" | festival --tts;; esac case $HR in " 1") echo $INTRO "one, $MIN" | festival --tts;; " 2") echo $INTRO "two, $MIN" | festival --tts;; " 3") echo $INTRO "three, $MIN" | festival --tts;; " 4") echo $INTRO "four, $MIN" | festival --tts;; " 6") echo $INTRO "six, $MIN" | festival --tts;; " 7") echo $INTRO "seven, $MIN" | festival --tts;; " 8") echo $INTRO "eight, $MIN" | festival --tts;; " 9") echo $INTRO "nine, $MIN" | festival --tts;; "10") echo $INTRO "ten, $MIN" | festival --tts;; "11") echo $INTRO "eleven, $MIN" | festival --tts;; "12") echo $INTRO "twelve, $MIN" | festival --tts;; "13") echo $INTRO "thirteen, $MIN" | festival --tts;; "14") echo $INTRO "fourteen, $MIN" | festival --tts;; "15") echo $INTRO "fifteen, $MIN" | festival --tts;; "16") echo $INTRO "sixteen, $MIN" | festival --tts;; "17") echo $INTRO "seventeen, $MIN" | festival --tts;; "18") echo $INTRO "eighteen, $MIN" | festival --tts;; "19") echo $INTRO "nineteen, $MIN" | festival --tts;; "20") echo $INTRO "twenty, $MIN" | festival --tts;; "21") echo $INTRO "twenty one, $MIN" | festival --tts;; "22") echo $INTRO "twenty two, $MIN" | festival --tts;; "23") echo $INTRO "twenty three, $MIN" | festival --tts;; "24") echo $INTRO "twenty four, $MIN" | festival --tts;; *) echo "error with hour $HR and minute $MIN" | festival --tts;; esac