case statement

Hi,
I am writing case statement to execute some finction, my requirement is once one of the case statement is executed again it has to prompt for the option.

for script in `echo "$Script_Selected"`
do

case $script in

	1) getNoOFActUsers
	;;
	2) moveServerrOORotation
	;;
            3) qMsgCount
	;;
esac
done

For eg if the user selects option1 it exeucte "getNoOFActUsers" method, after that is has to again for the option.
Please help

Thanks in advance
Satya

To keep the forums high quality for all users, please take the time to format your posts correctly.

First of all, use Code Tags when you post any code or data samples so others can easily read your code. You can easily do this by highlighting your code and then clicking on the # in the editing menu. (You can also type code tags

```text
 and 
```

by hand.)

Second, avoid adding color or different fonts and font size to your posts. Selective use of color to highlight a single word or phrase can be useful at times, but using color, in general, makes the forums harder to read, especially bright colors like red.

Third, be careful when you cut-and-paste, edit any odd characters and make sure all links are working property.

Thank You.

The UNIX and Linux Forums

i'm not sure what you want exactly, but something like this?:

function menu
{
        echo "Main Menu"
        echo "---------"
        echo "1 - option1."
        echo "2 - option2."
        echo "3 - option3."
        echo "4 - exit."
        read option
        return $option
}

while [ "true" ]
do
        menu
        case  $? in
                "1") echo "Option 1"
                ;;
                "2") echo "Option 2"
                ;;
                "3") echo "Option 3"
                ;;
                "4") echo "Bye"
                   exit 0
                ;;
        esac
done