Tuesday 20 December 2011

Scripting problem

Scripting problem

Well, this is my first post, so "Hello there!"
I'm learnig to use shell script at the moment and I bumped into a problem... When I run the below menu script(with dialog), my screen clears and I only get my prompt again. No error, nothing. Just my prompt, way down below.

Can someone tell me where the problem might be?

Code:

#!/bin/bash
#
#Menu created with dialog

dialog --backtitle "Mediaserver Vanoppen-Verhasselt Main Menu" --title "Mediaserver menu" --menu "Move using [UP] [DOWN], [Enter] to select" 15 50 3 \
Date/Time "shows Date and Time"\
Calendar "To see the calendar of this month"\
Editor "Start with some scripting"\
Movies "Show Movies list" 2>/tmp/menuitem.$$

menuitem=`cat /tmp/menuitem.$$`

opt=$?

case $menuitem in
Date/Time) date;;
Calendar) cal;;
Editor) nano;;
Movies) `ls /media/EXHD/Movies` ;;
esac

No comments:

Post a Comment