What is the reason for the weird syntax of the “case” statement in a bash/zsh script?

后端 未结 4 1922
庸人自扰
庸人自扰 2020-12-29 18:13

Looking from a programmer\'s point of view then shell script is just another programming language, where one has to learn and conform to the rules of the language. However,

4条回答
  •  粉色の甜心
    2020-12-29 18:29

    The reason of using ;; is that a single ; can be used to write multiple statements in one line, like:

    restart)
       stop; start;;
    ...
    

提交回复
热议问题