How do I turn off echo in a terminal?

后端 未结 4 1998
青春惊慌失措
青春惊慌失措 2020-12-09 09:42

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 p

4条回答
  •  轻奢々
    轻奢々 (楼主)
    2020-12-09 10:31

    stty_orig=`stty -g`
    stty -echo
    echo 'hidden section'
    stty $stty_orig
    

提交回复
热议问题