read -p "Input your option: " yn
if [ "${yn}" == "Y" ] || [ "${yn}" == "y" ]; then
echo "OK"
exit 0
fi
if [ "${yn}" == "n" ]||[ "${yn}" == "N" ]; then
echo "Oh, Interrupt"
exit 0
fi
bash条件语句练习
最新推荐文章于 2024-08-15 10:49:31 发布