Welcome 微信登录
编程资源 图片资源库 蚂蚁家优选 PDF转换器

首页 / 操作系统 / Linux / Linux Shell 分支语句

Linux Shell 分支语句:
  1. #!/bin/sh   
  2. # test   
  3. echo -n "are you sure to delete these files?"  
  4. read ANS  
  5. case $ANS in  
  6. y|Y|yes|Yes)  
  7.         rm a.txt  
  8.         ;;  
  9. n|N|no|No)  
  10.         exit 0  
  11.         ;;  
  12. esac