【发布时间】:2013-08-05 05:20:31
【问题描述】:
如果条件为真而不杀死整个脚本,您将如何退出函数,只需返回到调用函数之前。
例子
# Start script
Do scripty stuff here
Ok now lets call FUNCT
FUNCT
Here is A to come back to
function FUNCT {
if [ blah is false ]; then
exit the function and go up to A
else
keep running the function
fi
}
【问题讨论】:
-
查看this answer 以获得干净、安静和简单的退出方式。