之前版本的case in a) ;; esacgit
只能其中選擇一個,;;& 能夠支持屢次選擇。ide
例子:it
老用法class
$ case y in [[:lower:]]) echo lower ;; [[:digit:]] ) echo number ;; [[:alpha:]] ) echo alphabetic ;; esacdi
lowerview
新用法vi
$ case y in [[:lower:]]) echo lower ;;& [[:digit:]] ) echo number ;;& [[:alpha:]] ) echo alphabetic ;; esacco
lowereditor
alphabeticcas