linux 中有用的菜单

还是看看code 吧:

root@oc2246430752 scripts]# cat main_menu.sh
#!/bin/bash
#############################
#File name:Main_menu.sh
#Author:david
#Create Date:2019-03-28
#############################

#Display main menu
while true
    do
    clear
    echo -e "\n\n \t\t \033[40;32m ====Ansible Make Working Easy=====\033[1m \t\t"
    echo -e "\n"
    echo -e "\t"1\)Monitor Disk Usage
    echo -e "\n"
    echo -e "\t"2\)Server Status Check
    echo -e "\n"
    echo -e "\t"3\)Get and Give Files
    echo -e "\n"
    echo -e "\t"4\)ID related Tasks
    echo -e "\n"
    echo -e "\t"5\)Patching Related Tasks
    echo -e "\n"
    echo -e "\t"6\)Serive related Tasks
    echo -e "\n"
    echo -e "\t"7\)File related Tasks
    echo -e "\n"
    echo -e "\t"8\)Google for your time
    echo -e "\n"
    echo -e "\t"0\)Exit
    echo -e "\n"
    echo -e "Please choose task number..."
    read choice             #put the number in this parameter

    case $choice in
        0)
            break;;
        1)
                        echo "Now Checking disk usage..."
                        sleep 1
                        sh df_mail.sh
            echo "Disk checking is completed. Press Enter to continue..."
                        continue;;
        2)
                        echo "Now Choose which item need to check..."
                        sleep 3
            sh status.sh
                        echo "Server checking is completed. Press Enter to continue..."
                        continue;;
        3)
                        echo "Now Choose Proper Task items..."
                        sleep 2
                        sh gg.sh
            echo "Task is completed. Press Enter to continue...."
                        continue;;
        4)
                        echo "Please choose ID task ..."
                        sleep 2
            sh id.sh
                        continue;;
        5)
                        echo "Please choose patching task..."
                        sleep 2
                        sh patch.sh
            echo "Task is completed. Press Enter to continue...."
            continue;;
        6)
                        echo "Choose the service Items..."
                        sleep 2
            sh service.sh
            continue;;
        7)
                        echo "Please choose which File tasks ..."
                        sleep 3
            sh file.sh
            continue;;
        8)
                        echo "Google is welcoming you. Press Enter to continue...."
            sleep 3
            gnome-open http://www.google.com > /dev/null 2>&1
                        continue
    esac

done

 

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包

打赏作者

shenghuiping2001

你的鼓励将是我创作的最大动力

¥1 ¥2 ¥4 ¥6 ¥10 ¥20
扫码支付:¥1
获取中
扫码支付

您的余额不足,请更换扫码支付或充值

打赏作者

实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值