0
MinuteNow=date +%M
;
for ((i=2;i<=57;i+=5))
do
if [ "$MinuteNow" == "$i" ]; then
*************
fi
done
The problem is for 2 and 7, the date commande output is 02 and 07 but the variable $i is 2 and 7... I tried to add a condition to change only these 2, but it was bugging the loop...
Can you give me a tip please?
1Unix is an operating system. Saying "how do I do X in a Unix script" is like "how do I do X in a Windows programming language" without telling which of the hundred languages you use. – user1686 – 2011-02-22T13:59:33.857