标签:shell
#!/bin/bash #2017-8-23 #这是一个交互式登录指定用户名以及密码的脚本 uname=zhangsan passwd=123 read -p "Please enter your name : " UNAME read -p "Please enter your passwd: " PASSWD if [ "$UNAME" == "zhangsan" ] | [ "$PASSWD" == "123" ] ; then echo "your name is $uname passwd is $passwd" else echo "fail" fi
标签:shell
原文地址:http://innocence.blog.51cto.com/4313888/1958842