I'm writing a Bourne shell script and have a password input like this:
echo -n 'Password: '
read password
Obviously, I don't want the password being echoed to the terminal, so I want to turn off echo for the duration of the read. I know there's way to do this with stty
, but I'll ask the question for the benefit of the community whilst I go read the manpage. ;)
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…