bash4.0之;;&

之前版本的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

相關文章
相關標籤/搜索