Solved read from terminal without echoing input

I am using /bin/sh for a shell script, so I don't believe I can do read -s to turn off echoing what is typed. I switched my scripts to /bin/sh for compatibility and to ensure they run anywhere. Is it still possible to read without echoing?
 
so I don't believe I can do read -s to turn off echoing what is typed.
Correct, that option is specific to bash, so not available in a POSIX shell.

Classic POSIX: stty -echo; read mypassword; stty echo

Code:
     echo (-echo)
                 Echo back (do not echo back) every character typed.
stty(1)
 
Back
Top