欢迎光临
我们一直在努力

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

建站超值云服务器,限时71元/月

 
until
echo List Directory……….1
echo Change Directory……..2
echo Edit File……………3
echo Remove File………….4
echo Exit Menu……………5

read choice
test $choice = 5
do
case $choice in
1) ls;;
2) echo Enter target directory
read dir
cd $dir
;;
3) echo Enter file name
read file
vi $file
;;
4) echo Enter file name
read file
rm $file
;;
q|Q|5) echo Goodbye;;
*) echo illegal Option
esac     
  

赞(0)
版权申明:本站文章部分自网络,如有侵权,请联系:west999com@outlook.com 特别注意:本站所有转载文章言论不代表本站观点! 本站所提供的图片等素材,版权归原作者所有,如需使用,请与原作者联系。未经允许不得转载:IDC资讯中心 » shell编程例子 — 一个简单的目录菜单
分享到: 更多 (0)

相关推荐

  • 暂无文章