shell脚本隐藏键盘输入内容

Posted yangxuming

tags:

篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了shell脚本隐藏键盘输入内容相关的知识,希望对你有一定的参考价值。

#!/bin/sh
#Filename:inputPassword.sh
echo -e "Enter password:"
stty -echo
read password
#重新回显
stty echo
echo
echo ‘your password is‘ $password
echo Password read.

 

以上是关于shell脚本隐藏键盘输入内容的主要内容,如果未能解决你的问题,请参考以下文章