A simple shell script with menu options

Source: Internet
Author: User

This is a simple shell script, which contains a lot of shell script writing skills, although the script is compiled from other video tutorials, however, it has paved the way for me to write shell scripts in the future.

#!/bin/bash############## main menu ##############main_menu (){echoechodis_mainmenu="CREATE MINISITE IN CHINAITLAB.COM"curdate=`date "+%Y-%m-%d %T"`cat <<mayday             DATE :$curdate    ============================================               $dis_mainmenu    ============================================       **    1)ADD MINISITE ACCOUNT           **    **    2)ADD DOMAIN IN CHINAITLAB.COM   **    **    3)ADD DATABASE IN MYSQL          **    **    4)ADD VIRTUAL  HOST IN APACHE    **    **    5)BACK MINISITE                  **    **    6)DELETE MINISITE                **    **    7)EXIT                           **mayday}while [ $loopvar -gt 0 ]do          main_mean    echo -n "             please choose[1-7]:"    read main_choice    case $main_choice in           7)     exit     ;;     *)     clear     esacdone


A simple shell script with menu options

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.