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