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

linux shell编程模拟用户登录

2010-10-12 15:12 316 查看
a="hello world"
echo "A is:" $a
echo "when you want to run this script ,please input your id and passwd!"
echo "please input you ID:"
read ID
stty -echo
echo "please input your password"
read password
stty echo
if [ $ID = "abc" ] && [ $password = "123" ]
then
echo "ok ,your have already login."
else
echo "your input is error"
fi
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: