Shell脚本中常用的控制结构

2014-11-24 14:06:09 · 作者: · 浏览: 3

if [ test_command ]


then


fi


if [ test_command ]


then


else


fi


elif [ test_command ]


then


...


...


else (optional)


fi




done




...


...


*) (可选 - any other value)


commands_to_execute_for_no_match


esac