X-Git-Url: https://git.josue.xyz/?p=whiptailexamples%2F.git;a=blobdiff_plain;f=menubox.sh;fp=menubox.sh;h=44473d155d7366fe99ae068555a812dc83ab54fc;hp=0000000000000000000000000000000000000000;hb=4eb1a6e1220dee809c089a0a7db1f22a1277c8e0;hpb=e38cc981105fb88c40c6e287900fb8a2537d3c29 diff --git a/menubox.sh b/menubox.sh new file mode 100755 index 0000000..44473d1 --- /dev/null +++ b/menubox.sh @@ -0,0 +1,13 @@ +#!/bin/bash +OPTION=$(whiptail --title "Test Menu Dialog" --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) + +exitstatus=$? +if [ $exitstatus = 0 ]; then + echo "Your chosen option:" $OPTION +else + echo "You chose Cancel." +fi