我的老师列出了以下链接运算符:
& && ( ) ; ;; | || new line
怎么 ;;链式运算符,它有什么作用?
答案1
您的老师稍后可能会讨论case
中的语句bash
以及每个选项语句如何由 结束;;
。
如:
case $space in
[1-6]*)
Message="All is quiet."
;;
[7-8]*)
Message="Start thinking about cleaning out some stuff. There's a partition that is $space % full."
;;
9[1-8])
Message="Better hurry with that new disk... One partition is $space % full."
;;
99)
Message="I'm drowning here! There's a partition at $space %!"
;;
*)
Message="I seem to be running with an nonexistent amount of disk space..."
;;
esac