Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations IamaSherpa on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Password not to print in monitor

Status
Not open for further replies.

lorel

MIS
Jun 15, 2004
158
I have the need to ask for a password from my user to allow only some employees to get into a section of the script. I would like to set it up so when I ask for the password it does not shows up on the screen while is being type in.
I think to recall that there was a way to do this but the last time I did it was many, many moons ago.
Can any one tell me an easy way to accomplish this?
I am using SCO UNIX Ver. 5.0.7

Thanks in advance

Joe
 
man stty
Code:
savetty=`stty -g`
stty -echo
trap "stty $savetty" 1 2 3 15
read password
stty $savetty

Hope This Helps, PH.
FAQ219-2884
FAQ181-2886
 
Thank you PHV, it worked just the way I wanted
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top