From 1437f7c891f9a009d6401058beb0b42bf66994ad Mon Sep 17 00:00:00 2001 From: ChiefGyk Date: Wed, 29 Jun 2016 13:49:22 -0400 Subject: [PATCH] dialog for china and korea --- dialog.sh | 33 +++++++++++++++++++++++++++++++++ 1 file changed, 33 insertions(+) create mode 100644 dialog.sh diff --git a/dialog.sh b/dialog.sh new file mode 100644 index 00000000..fb177587 --- /dev/null +++ b/dialog.sh @@ -0,0 +1,33 @@ +#!/bin/bash + +HEIGHT=15 +WIDTH=40 +CHOICE_HEIGHT=4 +BACKTITLE="Backtitle here" +TITLE="Title here" +MENU="Choose one of the following options:" + +OPTIONS=(1 "China" + 2 "Korea" + 3 "China and Korea") + +CHOICE=$(dialog --clear \ + --backtitle "$BACKTITLE" \ + --title "$TITLE" \ + --menu "$MENU" \ + $HEIGHT $WIDTH $CHOICE_HEIGHT \ + "${OPTIONS[@]}" \ + 2>&1 >/dev/tty) + +clear +case $CHOICE in + 1) + echo "You chose Option 1" + ;; + 2) + echo "You chose Option 2" + ;; + 3) + echo "You chose Option 3" + ;; +esac \ No newline at end of file