Re: suppress echo in script for password

From: Maguire, James (James.Maguire@OGS.STATE.NY.US)
Date: Thu Nov 20 2003 - 10:02:32 EST


Shawn,

echo "Enter password: "\\c
stty -echo
read password
stty echo

will turn off the echo

-----Original Message-----
From: Shawn Bierman [mailto:BiermanS@METHODISTHEALTH.ORG]
Sent: Thursday, November 20, 2003 9:42 AM
To: aix-l@Princeton.EDU
Subject: suppress echo in script for password

is it possible to turn off the echo while someone enters their password into
a ksh script?

ie.

?-snip---
echo "enter password: \c"
read password
?-snip---

also is it possible to echo asterisks instead of the chars?

-shawn



This archive was generated by hypermail 2.1.7 : Wed Apr 09 2008 - 22:17:22 EDT