菜单程序问题?
发表于 : 2006-12-29 16:49
系统: ubuntu 6.10
问题: /bin/sh: Syntax error: end of file unexpected (expecting "done")
请大家帮我看看错在哪里,还有菜单应该如何实现?
#!/bin/ksh
# menu
while :
do
tput clear
cat <<MAYDAY
--------------------------------------------------------
User:user HOST:c222 date:2006-12-31
--------------------------------------------------------
MAYDAY
#here document finished
echo -e -n "\tYour Choice [1,2,3,H,Q]>"
read choice
case $choice in
q|Q) exit 0
;;
esac
echo -e -n "\t Hit the return key to contiunue"
read DUMMY
done
问题: /bin/sh: Syntax error: end of file unexpected (expecting "done")
请大家帮我看看错在哪里,还有菜单应该如何实现?
#!/bin/ksh
# menu
while :
do
tput clear
cat <<MAYDAY
--------------------------------------------------------
User:user HOST:c222 date:2006-12-31
--------------------------------------------------------
MAYDAY
#here document finished
echo -e -n "\tYour Choice [1,2,3,H,Q]>"
read choice
case $choice in
q|Q) exit 0
;;
esac
echo -e -n "\t Hit the return key to contiunue"
read DUMMY
done