这个脚本怎么不能运行呢?高手请进(已解决)

sh/bash/dash/ksh/zsh等Shell脚本
回复
jhx0301
帖子: 27
注册时间: 2007-11-16 15:52
来自: 杭州
联系:

这个脚本怎么不能运行呢?高手请进(已解决)

#1

帖子 jhx0301 » 2007-11-21 21:44

******已经解决了 是我写程序的时候少了些空格******
下面的程序是实现一个简单的目录菜单
#!/bin/sh
until
echoListDirectory..........1
echoChangeDirectory........2
echoEditFile...............3
echoRemoveFile.............4
echoExitMenu...............5

readchoice
test$choice=5
do
case$choicein
1)ls
;;
2)echoEntertargetdirectory
readdir
cd$dir
;;
3)echoEnterfilename
readfile
vi$file
;;
4)echoEnterfilename
readfile
rm$file
;;
q|Q|5)echoGoodbye;;
*)echoillegalOption
esac
done

root@jhx-ubuntu:~/bash# chmod +x test
root@jhx-ubuntu:~/bash# ./test
./test: 13: Syntax error: ")" unexpected (expecting "done")
总是提示这个错误 应该怎么解决呢 望指教
回复