十年网站开发经验 + 多家企业客户 + 靠谱的建站团队
量身定制 + 运营维护+专业推广+无忧售后,网站问题一站解决
以下内容是关于云计算学习路线源码框架笔记内容,下面是关于while循环结构的内容:
创新互联是一家专注于成都网站设计、成都网站建设与策划设计,镇江网站建设哪家好?创新互联做网站,专注于网站建设十多年,网设计领域的专业建站公司;建站业务涵盖:镇江等地区。镇江做网站价格咨询:18982081108
while 条件
do
循环体
done
完善系统工具的输出及可操作性
#!/usr/bin/env bash
#
while 1>0
do
cat <<-EOF
+-------------------------------------------------------------------------+
| System_tools V1.0 |
+-------------------------------------------------------------------------+
| a. Stop And Disabled Firewalld. |
| b. Disabled SELinux Secure System. |
| c. Install Apache Service. |
| d. Quit |
+-------------------------------------------------------------------------+
EOF
printf "\e[1;35m Please input your select: \e[0m" && read var
case "$var" in
"a")
systemctl stop firewalld && systemctl disable firewalld
;;
"b")
sed -ri s/SELINUX=enforcing/SELINUX=disabled/g /etc/selinux/config
;;
"c")
yum -y install httpd httpd-tools
;;
"d")
exit
;;
*)
printf "请按照上方提供的选项输入!!!\n"
;;
esac
if [ $? -eq 0 ];then
clear
else
printf "\e[1;31m Warning: Your program exist ERROR!!! \e[0m\n"
break
fi
done