if
if test-commands; then
consequent-commands;
[elif more-test-commands; then
more-consequents;]
[else alternate-consequents;]
fi
执行test-commands,如果返回状态为零,则执行consequent-commands
如果test-commands返回非零状态,则依次执行每个elif的more-test-commands,如果退出状态为零,则执行相应的more-consequents
如果else存在,并且最后的if或elif子句中的测试命令的退出状态为非零,则执行alternate-consequents
返回状态是最后执行的命令的退出状态;如果任