I have written the following function in a bash script but it is not working. Am I missing something obvious?
main_menu() {
dialog \
--title "Sim Gateway Infomation Utility" \
--menu "What do you want to do?" 12 60 5 \
Summary "View overall summary" \
Details "View details of a sim bank" \
Modify "Modify used minutes of a sim" \
Exit "Exit" \
2>$tempfile
retval=$?
case retval in
0)
choice=`cat $tempfile`
case $choice in
Summary) summary;;
Details) details;;
Modify) modify;;
Exit) clean_up;;
esac
;;
1)
confirm_exit;;
255)
confirm_exit;;
esac
}