|
|||||||
| Forums | Search Forums | Register | Forum Rules | Man Pages | Albums | FAQ | Members | Calendar | Search | Today's Posts | Mark Forums Read |
| Shell Programming and Scripting Post questions about KSH, CSH, SH, BASH, PERL, PHP, SED, AWK and OTHER shell scripts and shell scripting languages here. |
|
|
|
Thread Tools | Search this Thread | Display Modes |
|
#1
|
|||
|
|||
|
suppress echo while reading input in expect
Hi all,
I tried searching for similar threads. Couldn't get any for Expect scripting. I am trying automate a task which requires login to a machine. The user would be prompted for the password. Now, I want this input to be hidden from being displayed on the screen. Is there any way, we can suppress echo to the terminal? Similar to the way we do 'stty -echo' in shell script? rgds, Sudhir. |
| Sponsored Links | ||
|
|
#2
|
|||
|
|||
|
It's the same in Expect. Code:
send_user "What is your password "
stty -echo
expect_user -re "(.*)\n" {set PASS $expect_out(1,string)}
send_user "\n"
stty echoI've just started learning Expect myself, but I have used that piece of code successfully. |
| Sponsored Links | ||
|
![]() |
| Thread Tools | Search this Thread |
| Display Modes | |
More UNIX and Linux Forum Topics You Might Find Helpful
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| File Reading for a certain string and echo the line before | MKNENI | Shell Programming and Scripting | 13 | 03-12-2012 11:18 AM |
| help with echo command in reading blank spaces in aix | techmoris | Shell Programming and Scripting | 3 | 02-16-2010 01:38 PM |
| Reading specific contents from 1 input files and appending it to another input file | sksahu | Shell Programming and Scripting | 5 | 01-14-2009 05:09 AM |
| Reading password and echo * character | alanpachuau | Shell Programming and Scripting | 4 | 04-06-2008 03:00 AM |
| How to suppress input keying from displaying on terminal. | liteyear18 | UNIX for Dummies Questions & Answers | 2 | 07-19-2001 09:13 AM |
|
|