Section 11.1: 无限循环
while true; do
echo ok
done
or
while :; do
echo ok
done
or
until false; do
echo ok
done
Section 11.2: 函数返回
function positive() {
return 0
}
function negative() {
return 1
}
Section 11.3: 永远/从不执行的代码
if true; then
echo Always executed
fi
if false; then
echo Never executed
fi