I want to prompt users to enter a "security code" before they run my program.
I am trying "read" in ksh. But the code is displayed on the screen. I don't
want the code to be seen by others standing behind. Is this possible in ksh?
Thanks in advance!
c*****n 发帖数: 11
2
I found the answer. Thank you for reading.
stty_orig=`stty -g`
stty -echo
read secret
stty $stty_orig
program.
【在 c*****n 的大作中提到】 : I want to prompt users to enter a "security code" before they run my program. : I am trying "read" in ksh. But the code is displayed on the screen. I don't : want the code to be seen by others standing behind. Is this possible in ksh? : Thanks in advance!