菜单程序问题?

sh/bash/dash/ksh/zsh等Shell脚本
回复
fjchenq
帖子: 160
注册时间: 2006-12-14 19:14

菜单程序问题?

#1

帖子 fjchenq » 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
回复