cyclists 大佬有话说 :
sh 脚本问题求助脚本大佬!
# !/bin/bash -x
# filename:running.sh
last_run_time=0
curr_run_time=‘date + %s’
seconds=$((85*24*3600))
if [[ $ ((curr_run_time – last_run_time)) -ge $seconds ]]
then
bash siript.sh
sed -i ‘4 s/ * /“$curr_run_time”/‘ script.sh
我这样写是否恰当?
因为我想定时设置一个任务,每隔85天自动执行任务,有没有哪位大佬更好的方案?
一位不知名网友 大佬有话说 :
这个就涉及到了我的知识盲区