判斷式中除了 if-then-else外,還有就是 switch-case. case 開頭,esac 結尾. #!/bin/bash col=${COLOR} case "$col" in red) echo "Color is : $col" ...
確定! 回上一頁