2019独角兽企业重金招聘Python工程师标准>>>
模拟linnux登录shell
#!/bin/bash
echo -n "login:"
read name
echo -n "passwd:"
read passwdif [ $name="aaa" -a passwd="aaa" ]; thenecho "the host and passwd is right!"
elseecho "input is error!"
fi
[root@localhost shell]# sh 5_login.sh
login:aaa
passwd:aaa
the host and passwd is right!