case分支条件语句。 case "string" in pattern_1) commands ;; pattern_2) commands ;; *) commands ;; esac 当条件语句中的string等于patern字符串时执行pattern下面命令。 当没有符合条件时,最后执行*)。 ";;"相当于switch语句中的break关键字,不加";;"会报错。
Linux Shell编程三
原文:http://www.cnblogs.com/zhanggaofeng/p/5926193.html