export CTR=0
while [ true ]
do
if [ ${CTR} -ge ${COUNT} ]
then
exit
fi
for DAY in Sat Sun
do
INTERVAL=$INTERVAL1
done
/home/mg01800/scripts/send_output.sh
CTR=$(expr ${CTR} + 1)
sleep ${INTERVAL}
done
But I think the problem with your script is having "done" in the wrong place.
export CTR=0
while [ true ]
do
if [ ${CTR} -ge ${COUNT} ]
then
exit
fi
for DAY in Sat Sun
do
INTERVAL=$INTERVAL1
/home/mg01800/scripts/send_output.sh
done
CTR=$(expr ${CTR} + 1)
sleep ${INTERVAL}
done
But I can't figure out why you set interval to 3600 at the beginning, and then overwrite it later on before you do anything with it.