periodical time

NAME: robozeit
LANGUAGE: english
DESCRIPTION: robotvoice, announcing the time periodically
AUTHOR: linuxnetzer

#!/bin/sh
clear
#########################################-------------------
#echo Periodical Robo Time Reader       # what is it?
#echo Requires: sox, festival           # pakets needed
#echo Web:      linuxnetz.wordpress.com # website
#echo Contact:  rokokokomiker@gmx.de    # contact
#########################################-------------------
PROGNAME="robozeit"                     # name
echo $PROGNAME: "robotvoice, announcing the time periodically\
(standard: 60 s)"\
| grep --color $PROGNAME
echo "Usage: $PROGNAME [time in s]"     | grep --color Usage
# echo "If no input: standard 60 s"     # loop standard
#########################################-------------------
if [ $1 != "" ]         2>/dev/null     # if input yes
then                            # then use
SLEEP="$1"              # input user
else                            # else use
SLEEP="60"              # default
fi                                      # done
#########################################-------------------
echo "Ready to go! Announcing time every $SLEEP seconds"      # confirm loop
#########################################-------------------
while true                              # always
do                              # loop start
VAR=`date +'%H:%M'`     # get  time

robo "the time: $VAR"   # read time
sleep $SLEEP            # loop time
done                            # loop stop
#########################################-------------------
exit                                    # bye
#########################################-------------------

Advertisements

Post a Comment

Required fields are marked *

*
*

%d bloggers like this: