shell练习(2)

1.给脚本service.sh进行修改,当执行的时候要求输入(1、2、3、4、5)时安装对应的httpd、vim、wget、更换aliyum等功能,当输入错误 时提示应该输入正确的值但是不会退出。
[root@bogon yy]# cat service.sh 
#!/bin/bash
while :
do
cat <<-EOF 
+-------------------------------------------------------------------------+ 
|                             System_tools V1.0                           | 
+-------------------------------------------------------------------------+
|                     1. 更换阿里源.                                      |
|                     2. 安装http.                                        |
|                     3. 安装vim.                                         |
|                     4. 安装wget.                                        |
|                     5. exit.                                            |     
+-------------------------------------------------------------------------+ 
EOF
read -p "请输入你的选项:" cce
case $cce in
        1)
        rm 

你可能感兴趣的:(shell,linux,学习方法)