WEB开发网
开发学院WEB开发综合 shell编程例子--一个简单的目录菜单 阅读

shell编程例子--一个简单的目录菜单

 2006-03-05 11:32:55 来源:WEB开发网   
核心提示:untilechoListDirectory..........1echoChangeDirectory........2echoEditFile...............3echoRemoveFile.............4echoExitMenu...............5readchoicetest$
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

Tags:shell 编程 例子

编辑录入:爽爽 [复制链接] [打 印]
赞助商链接