shell编程-----while、until、case、select语句

一、while

 

 

 

 

 

 

 

 

 

 

 

 

 

二、until

 

 

 

 

三、case语句

case 变量名 in
  值1) 
   指令1 
  ;; 
  值2) 
   指令2 
  ;; 
  值3) 
   指令3 
  ;; 
esac

 

 

 

 

输出举例

 

 

 

四、select语句

 

 

 

输出

 

 PS3是一个和select循环语句结合使用的方式,在select语句后提示出要提示的语句。

 

 

 

 

输出

 

posted @ 2020-06-27 23:05  知道了呀~  阅读(208)  评论(0编辑  收藏  举报