标签:passwd mamicode com info cti dmi image 模拟登陆 img
模拟登录
#!/bin/bash
tname="admin"
tpasswd="123"
name=‘‘
passwd=‘‘
function login(){
echo "请输入用户名:"
read name
echo "请输入密码:"
read passwd
}
function check(){
if [ ${tname} == ${name} -a ${tpasswd} == ${passwd} ]; then
echo "登录成功"
exit 0
fi
main
}
function main(){
login
check
}
main
标签:passwd mamicode com info cti dmi image 模拟登陆 img
原文地址:https://www.cnblogs.com/hongfeng2019/p/12168899.html