#!/bin/bash


PORT="COM1"
SLEEP="300"


while [ "$#" -ge "1" ]
do
case "$1" in 

-p ) 
    shift 
    PORT="$1"
    shift 
;;
-s ) 
    shift 
    SLEEP="$1"
    shift 
;;
--help ) 
    echo "Usage: `basename $0` [-p <port>] [-s <sleepInterval>]"
    exit 0
;;
*) 
    shift
;;
esac
done
#echo "PORT=$PORT SLEEP=$SLEEP"

while [ 1 -gt 0 ]
do
#echo "Wakeup!" > $PORT
bcastc
echo `date`
sleep $SLEEP
done
