On 23:39 03 Sep 2003, Patrick Nelson <[EMAIL PROTECTED]> wrote: | Writing a script that asks for a pass-phrase to use specific features of | the script. Would like to hid the input of the phrase from the screen | while the user types it in. Whats the best way?
Well, the easy way is this: stty -echo echo "Enter Password now:" read password stty echo Remark: Note that the turning off of echo happens _before_ the prompt. If it happened afterwards then on a (very very) slow or busy machine the user _might_ get to read the prompt and start typing before the echo gets turned off, which would be bad. Cheers, -- Cameron Simpson <[EMAIL PROTECTED]> DoD#743 http://www.cskk.ezoshosting.com/cs/ Rather than a beep Or a rude error message, These words: "File not found." - Haiku Error Messages http://www.salonmagazine.com/21st/chal/1998/02/10chal2.html -- redhat-list mailing list unsubscribe mailto:[EMAIL PROTECTED] https://www.redhat.com/mailman/listinfo/redhat-list