我在 ksh 中有一个 Shell 脚本,在输入输入后,脚本要求输入 Y 表示是,输入 N 表示否,以便检查输入并继续。下面是脚本的那部分:
echo ""
YN=""
while [ "x$YN" != "xn" -a "x$YN" != "xN" -a "x$YN" != "xy" -a "x$YN" != "xY" ]; do
echo -n "Please confirm (y/n): "
read YN
done
if [ "x$YN" = "xn" -o "x$YN" = "xN" ]; then
exit 0
fi
我无法理解
while [ "x$YN" != "xn" -a "x$YN" != "xN" -a "x$YN" != "xy" -a "x$YN" != "xY" ];
在这方面你能帮我吗..