shell脚本实现互动式重启

来源:互联网 发布:最优化方法孙文瑜答案 编辑:程序博客网 时间:2024/05/22 13:19
#!/bin/bash
#-------------CopyRight-------------
#   Name:Reboot system
#   Contact:QQ 740711249
#------------Substance------------
echo "Reboot the system  yes or no"
select var in "yes" "no";
 do    break;
done
if [ "$var" = "yes" ];then
   reboot;
elif [ "$var" = "no" ];then
echo "Reboot system channel";
fi
0 0
原创粉丝点击