Xdialog Menu/If example


#!/bin/bash

choice=$(Xdialog --stdout --no-tags --menubox "Please Enter:" 20 60 0 1 One 2 Two 3 Three 4 Quit)

if [ "$choice" -eq 1 ] ; then
   Xdialog --msgbox "You choose the first option" 20 60
elif [ "$choice" -eq 2 ] ; then
   Xdialog --msgbox "You choose the second option" 20 60
elif [ "$choice" -eq 3 ] ; then
   Xdialog --msgbox "You choose the third option" 20 60
elif [ "$choice" -eq 4 ] ; then
   Xdialog --msgbox "You choose the quit option" 20 60
else
   Xdialog --msgbox "You choose the cancel button" 20 60
fi