-
-
Save jpedro/02560533a5d6839c2c90528271ce21da to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
HEIGHT=15 | |
WIDTH=40 | |
CHOICE_HEIGHT=4 | |
BACKTITLE="Backtitle here" | |
TITLE="Title here" | |
MENU="Choose an option:" | |
OPTIONS=(1 "Option 1" | |
2 "Option 2" | |
3 "Option 3") | |
CHOICE=$(dialog --clear \ | |
--backtitle "$BACKTITLE" \ | |
--title "$TITLE" \ | |
--menu "$MENU" \ | |
$HEIGHT $WIDTH $CHOICE_HEIGHT \ | |
"${OPTIONS[@]}" \ | |
2>&1 >/dev/tty) | |
case $CHOICE in | |
1) | |
echo "You chose Option 1" | |
;; | |
2) | |
echo "You chose Option 2" | |
;; | |
3) | |
echo "You chose Option 3" | |
;; | |
esac |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment