The UNIX and Linux Forums  

Go Back   The UNIX and Linux Forums > Top Forums > UNIX for Dummies Questions & Answers
Google UNIX.COM


UNIX for Dummies Questions & Answers If you're not sure where to post a UNIX or Linux question, post it here. All UNIX and Linux newbies welcome !!

More UNIX and Linux Forum Topics You Might Find Helpful
Thread Thread Starter Forum Replies Last Post
Suppress error message in unzip skwyer Shell Programming and Scripting 5 09-26-2007 02:20 PM
suppress echo while reading input in expect sudhir_onweb Shell Programming and Scripting 1 07-23-2007 06:54 AM
Don't show keyboard input on terminal marianor31 Shell Programming and Scripting 1 03-23-2007 02:54 PM
terminal emulation displaying in machine language Debbie UNIX for Dummies Questions & Answers 2 06-23-2005 02:43 PM
Suppress last N lines printing chakri400 High Level Programming 1 11-12-2003 10:19 AM

Closed Thread
 
LinkBack Thread Tools Display Modes
  #1 (permalink)  
Old 07-18-2001
Registered User
 

Join Date: Jul 2001
Location: New York
Posts: 11
Question How to suppress input keying from displaying on terminal.

I'm a Unix newbie.

In a shell-script, is there any way to accept keyboard input (via STDIN) without having it display on the screen? I know keying in a login password sort of does this by replacing what you key with astericks (*) but I believe that's a "C" routine. I'd like to be able to replicate that function in a Unix shell-script to allow my users to access specific data by prompting (via "read" command) for an "access" code that will NOT show on the terminal screen when it's keyed in. Is that possible?

Any help would be greatly appreciated. Thanks
Forum Sponsor
  #2 (permalink)  
Old 07-18-2001
Registered User
 

Join Date: Jun 2001
Posts: 41
Use:

stty -echo

What you type will not be displayed. To undo this:

stty echo

Regards
HTT
  #3 (permalink)  
Old 07-19-2001
Registered User
 

Join Date: Jul 2001
Location: New York
Posts: 11
HTT,

I tried your solution and it worked great ! ! !
Thank you very much. LY18
Google UNIX.COM
Closed Thread

Thread Tools
Display Modes




All times are GMT -7. The time now is 10:51 PM.


Powered by: vBulletin, Copyright ©2000 - 2006, Jelsoft Enterprises Limited.
The UNIX and Linux Forums Content Copyright ©1993-2008 The CEP Blog All Rights Reserved -Ad Management by RedTyger Visit The Global Fact Book

Content Relevant URLs by vBSEO 3.2.0