小编Bil*_*sif的帖子

如何以特定时间间隔自动执行bash脚本?

我希望我的代码自动执行。这该怎么做?任何人都可以帮助我吗?我如何在 bash 中构建调度程序,这是我的代码:

checkstatus()
 {
  opt_checkstatus=1
 while [ $opt_checkstatus != 7 ]
      do
       clear
  #echo -e "\nChoose the Option Bellow!!!\n
  echo -e "\n\t*****Note: Save your Iptables before stop/Restart the iptables Services*****\n"
  echo -e "   1. Save the iptables\n
   2. Status of Iptables\n
   3. Start iptables Services\n
   4. Stop iptables Services\n
   5. Restart iptable Services\n
   6. Flush iptables (**Use Carefully_it will remove all the rules from iptables**)\n
   7. Go back to Main Menu"
  read opt_checkstatus
  case $opt_checkstatus in
   1) echo -e …
Run Code Online (Sandbox Code Playgroud)

bash

6
推荐指数
3
解决办法
2万
查看次数

标签 统计

bash ×1