You know there is a built-in Bash command called read. What if I want to do this in my scripts:
read PASSWROD
When it prompts me to input, all my input is visible.
Is there an alternative command that can make the input invisible.
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
Time to learn how to manual bash (in the
bashmanual, that is; this is from the Bash 4.1 edition). The relevant option is-s.Hence, with the typo fixed, you need:
You may want to add an
echoimmediately after it since the newline isn’t echoed either (though it is not included in the password).