歡迎來到Linux教程網
Linux教程網
Linux教程網
Linux教程網
Linux教程網 >> Linux編程 >> SHELL編程 >> shell編程例子 -- 一個簡單的目錄菜單

shell編程例子 -- 一個簡單的目錄菜單

日期:2017/2/27 9:46:59   编辑:SHELL編程
  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 ;; QQ5) echo Goodbye;; *) echo illegal Option esac




Copyright © Linux教程網 All Rights Reserved