【发布时间】:2013-01-21 14:20:17
【问题描述】:
我使用了下面的脚本来提供一个选项菜单,但它提供了一个
syntax error: 'select' unmatched
这是我无法使用 elif 命令的脚本部分,因为 android 无法识别它。
OPTIONS="Continue Quit"
select opt in $OPTIONS; do
if [ "$opt" = "Quit" ]; then
echo closing Android Hardening
sleep 5
exit
fi
if [ "$opt" = "Continue" ]; then
echo ANDROID
echo HARDENING
else
echo incorrect selection restart application
sleep 7
exit 1
fi
【问题讨论】:
-
您缺少
done来结束选择。