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

相关文章
相关标签/搜索