Comment

Peter Bengtsson

Definitely a cleaner solution. Had I only known!

Parent comment

Joshua Randall

Note that you actually don't need to handle the terminal options with stty yourself -- the bash read builtin has an option that will do it for you [-s]. See http://www.ss64.com/bash/read.html for the other options for the read builtin. The following example should be functionally equivalent to yours: #!/bin/bash read -p "Username: " uname read -s -p "Password: " passw