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 Chris Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

tput portable terminal control : invis

Status
Not open for further replies.

raylin

MIS
Jun 7, 2001
177
CH
How can I make an input field to be read in a ksh script by the read verb invisible ?
the `tput invis` (Begin invisible text mode) seems not to be appropriate ;-)
 
To turn off echo... stty -echo
To turn echo back on... stty echo

Make sure you put a trap for exits that will run stty echo in case a user break out while echo is turned off.


Jim Hirschauer
 
You could change the interupt to something not likley to be used.

stty -echo intr '$-'
read input
stty echo intr '^C' <- That's a ctrl+C





Mike

"A foolproof method for sculpting an elephant: first, get a huge block of marble, then you chip away everything that doesn't look like an elephant."

 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top