雲計算學習路線源碼框架筆記:while循環結構

如下內容是關於雲計算學習路線源碼框架筆記內容,下面是關於while循環結構的內容:linux

while 條件git

dogithub

循環體bash

done框架

完善系統工具的輸出及可操做性ide

#!/usr/bin/env bash工具

#學習

Author: bavdu

Email: bavduer@163.com

Github: https://github.com/bavdu

Date: 2019//

while 1>0ui

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

相關文章
相關標籤/搜索