VT102图形测试whiptail

#!/bin/bash

whiptail --title "K8s,  Vision @ 2019" --menu "Choose your option" 20 65 13 \
"1" "Single K8s One-click" \
"2" "Cluste K8s One-click" \
"3" "Cluste K8s add node" \
"4" "Single K8s add node" \
"5" "del node" \
"6" "Uninstall K8s" \
"7" "Quit"  3>&1 1>&2 2>&3
#!/bin/bash
whiptail --title "导入集群IP地址(包含本机ip默认第一个ip对应本机ip作为master)" --yes-button "YES" --no-button "NO"  --yesno "批量导入集群IP地址?" 10 60
#!/bin/bash
whiptail --title "#请输入本机Ip(master)并回车#" --inputbox "请检查IP是否一致,确定提交?" 10 60 "$IP" 3>&1 1>&2 2>&3
#!/bin/bash
#---
if ( whiptail --title "Title hylan:yesno" --yesno "Choose between Yes and No." 10 60 ) then
     echo "You chose Yes. Exit status was $?."
else
     echo "You chose No. Exit status was $?."
fi
#---
if (whiptail --title "Title hylan:yesno" --yes-button "Hylan" --no-button "Candy"  --yesno "Which do you like better?" 10 60) then  
   echo "You chose Hylan. Exit status was $?."; 
   echo "You Best!"
else    
   echo "You chose Candy. Exit status was $?.";
fi
#---
whiptail --title "Title hylan:msgbox" --msgbox "Create a message box with whiptail. Choose Ok to continue." 10 60
#---
whiptail --title "Title hylan:inputbox" --inputbox "What is your pet's name?" 10 60 hylancandy 3>&1 1>&2 2>&3
#---
whiptail --title "Title hylan:passwordbox" --passwordbox "Enter your password and choose Ok to continue." 10 60 3>&1 1>&2 2>&3
#---
whiptail --title "Title hylan:menu" --menu "Choose your option" 15 60 4 \
"1" "Grilled Spicy Sausage" \
"2" "Grilled Halloumi Cheese" \
"3" "Charcoaled Chicken Wings" \
"4" "Fried Aubergine"  3>&1 1>&2 2>&3

#---
whiptail --title "Title hylan:checklist" --checklist "Choose preferred Linux distros" 15 60 4 "debian" "Venerable Debian" ON "ubuntu" "Popular Ubuntu" OFF "centos" "Stable CentOS" ON "mint" "Rising Star Mint" OFF 3>&1 1>&2 2>&3

{
     for (( i=0 ; i<=100 ; i+=20 )); do
         sleep 1
         echo $i
     done
} | whiptail --gauge "Please wait while installing" 6 60 0

#---
whiptail --title "Title hylan:checklist" --radiolist "Choose preferred Linux distros" 15 60 4 "debian" "Venerable Debian" ON "ubuntu" "Popular Ubuntu" OFF "centos" "Stable CentOS" ON "mint" "Rising Star Mint" OFF 3>&1 1>&2 2>&3