shell脚本暂停10分钟后执行下一条命令

shell脚本执行一条命令后暂停10分钟后再次执行这条命令:

while true
do

ti1=`date +%M`    #获取时间戳
ti2=`date +%M`
i=$(($ti2 - $ti1 ))
 
while [[ "$i" -ne "10" ]] #等待10m执行下一条指令
do
    ti2=`date +%M`
    i=$(($ti2 - $ti1 ))

done

done


 

发布了27 篇原创文章 · 获赞 31 · 访问量 17万+

猜你喜欢

转载自blog.csdn.net/qq_36249352/article/details/95316145