语法格式

case var in

pattern1 | patter2)

  command1

  command2;;

pattern3)

  command1

  command2;;

*)

  default command1

  default command2;;

esac

 

需要注意的是:

1)pattern可以包含通配符

2)语句中的;;括号类似于C语言中的break

相关文章:

  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2021-07-08
  • 2021-12-16
  • 2022-12-23
  • 2021-11-06
猜你喜欢
  • 2021-06-18
  • 2021-10-13
  • 2022-12-23
  • 2021-04-18
  • 2022-12-23
相关资源
相似解决方案