где я должен изменить данный сценарий оболочки?

Это мой вклад:

#!/bin/bash #Example of menu programs clear echo "*******************" echo "1.Date" echo "2.List of users" echo "3.Open a file" echo "4.delete a file" echo "5.Exit" echo "Enter a choice[1-5] :" read choice case $choice in 1) echo "Today date is : `date`";; 2) who ;; 3) `touch file`;; 4) `rm -rf kk`;; 5) exit ;; *) echo "choice wrong. try again";; esac 

Это мой вывод:

 ******************* 1.Date 2.List of users 3.Open a file 4.delete a file 5.Exit Enter a choice[1-5] : 1 Today date is : Sun Jul 19 08:07:41 PDT 2015 

Но я не ожидаю этого выхода.

Я ожидаю:

 ******************* 1.Date 2.List of users 3.Open a file 4.delete a file 5.Exit Enter a choice[1-5] : 1 Today date is : Sun Jul 19 08:07:41 PDT 2015 ******************* 1.Date 2.List of users 3.Open a file 4.delete a file 5.Exit Enter a choice[1-5] : 

Как я могу это достичь?

 #!/bin/bash #Example of menu programs while true; do echo "*******************" echo "1.Date" echo "2.List of users" echo "3.Open a file" echo "4.delete a file" echo "5.Exit" echo "*******************" echo "Enter a choice[1-5] :" read choice case $choice in 1) echo "Today date is : `date`";; 2) who ;; 3) `touch file`;; 4) `rm -rf kk`;; 5) break ;; *) echo "Wrong choice. Please try again";; esac done 

Для справки: Unix – Управление шлейфом

Поместите его в цикл:

 while true; do echo "*******************" echo "1.Date" echo "2.List of users" echo "3.Open a file" echo "4.delete a file" echo "5.Exit" echo "Enter a choice[1-5] :" read choice case $choice in 1) echo "Today date is : `date`";; 2) who ;; 3) `touch file`;; 4) `rm -rf kk`;; 5) break ;; *) echo "choice wrong. try again";; esac done 

или поместите свой скрипт внутри цикла

 while true; do menu.sh done