隐性输入密码
时间:2007-03-27 来源:bleach
隐性输入密码
#!/bin/bash
SAVEDSTTY=`stty -g`
echo -n "Enter your name:"
read NAME
stty -echo
echo -n "Enter you Passwd:"
read PASSWD
stty $SAVEDSTTY
echo "name=$NAME,passwd=$PASSWD"
SAVEDSTTY=`stty -g`
echo -n "Enter your name:"
read NAME
stty -echo
echo -n "Enter you Passwd:"
read PASSWD
stty $SAVEDSTTY
echo "name=$NAME,passwd=$PASSWD"
相关阅读 更多 +