CASE语法格式备忘
1 case $variable-name in 2 pattern1) 3 command1 4 ... 5 .... 6 commandN 7 ;; 8 pattern2|pattern3|pattern4) 9 command1 10 ... 11 .... 12 commandN 13 ;; 14 [a-z]) 15 command1 16 ... 17 .... 18 commandN 19 ;; 20 *) 21 command1 22 ... 23 .... 24 commandN 25 ;; 26 esac
bash 中的case语法
时间: 2024-09-30 19:46:44