您的位置:首页 > 运维架构 > Shell

shell编程--实现人机交互

2013-03-06 09:04 197 查看
while true;do
stty -icanon min 0 time 100
echo -n "Automatic execute ten seconds after,Are you sure you want to start the task(yes or no)?"
read Arg
case $Arg in
Y|y|YES|yes)
break;;
N|n|NO|no)
exit;;
"")  #Autocontinue
break;;
esac
done

echo
echo "others function..."
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: