Shell脚本实战之实现密码隐藏功能
1.代码如下
[root@server4 shells]# cat test4.sh
echo -e "Enter password:"
stty -echo
read password
stty echo
echo
echo "The password your input is $password"
[root@server4 shells]# ./test4.sh
Enter password:
The password your input is 123456
[root@server4 shells]#