Sponsored Content
Top Forums Shell Programming and Scripting suppress echo while reading input in expect Post 302128165 by sudhir_onweb on Monday 23rd of July 2007 05:35:43 AM
Old 07-23-2007
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.
 

10 More Discussions You Might Find Interesting

1. UNIX for Dummies Questions & Answers

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... (2 Replies)
Discussion started by: liteyear18
2 Replies

2. Shell Programming and Scripting

Reading password and echo * character

Hi, First of all i am using solaris 10. I want to write a script that ask user to enter password and read the character input from keyboard. The ask to re-enter the password and then if they are match it will accept. But my problem is I want to echo a '*' character instead of the character I... (4 Replies)
Discussion started by: alanpachuau
4 Replies

3. Shell Programming and Scripting

usage of echo with standard input

Hi, I am passing the file filename to a program and I have to use the "<" sign: program < filename Inside the program I would like to assign the string "filename" to a variable var. I can't do that with "var=$(echo $1)" because of the "<" sign. Removing the "<" sign would work for echo,... (13 Replies)
Discussion started by: calandrea
13 Replies

4. Shell Programming and Scripting

Reading specific contents from 1 input files and appending it to another input file

Hi guys, I am new to AWK and unix scripting. Please see below my problem and let me know if anyone you can help. I have 2 input files (example given below) Input file 2 is a standard file (it will not change) and we have to get the name (second column after comma) from it and append it... (5 Replies)
Discussion started by: sksahu
5 Replies

5. Shell Programming and Scripting

help with echo command in reading blank spaces in aix

Hi, I have a test.txt and would like to put in a different file but while putting in the other file, blank spaces are missing. $ indicates blank spaces filename: test.txt: USA$$$840$$$$ Desired output USA$$$840$$$$ Current output as per the following code. while read j; do... (3 Replies)
Discussion started by: techmoris
3 Replies

6. Shell Programming and Scripting

accept input on an echo output

echo (some info) read? <&1(not working for me) (1 Reply)
Discussion started by: robin_simple
1 Replies

7. Shell Programming and Scripting

File Reading for a certain string and echo the line before

Hi Guys, I have a big file like this. It has cache group line ( the bold lines ) and then followed by 10 status lines showing either Compelte or Failed. This pattern repeats several time. We can assume all the status lines have either Complete or Failed status for that Cache Group line. I... (13 Replies)
Discussion started by: MKNENI
13 Replies

8. UNIX for Dummies Questions & Answers

Auto input with echo

in cygwin, cron-config will ask two inputs: yes or no. 1st question, answer is no 2nd question, answer is yes my script: echo no | cron-config how do i pass yes to 2nd question ? (4 Replies)
Discussion started by: lawsongeek
4 Replies

9. Shell Programming and Scripting

Input in expect script

Hi, i have one problem with this script: ------------------------------- cat hostid_gathering #!/bin/bash cat /home/user1/ip_switch | while read LINE; do echo $LINE /home/user1/expect_script2 done ------------------------------ cat /home/user1/expect_script2 #!/usr/bin/expect... (6 Replies)
Discussion started by: elilmal
6 Replies

10. Shell Programming and Scripting

Why /tmp/1 has nothing after I echo something to it in expect?

lyang001@lyang001-OptiPlex-9010:~/updates/$ cat zz.sh #!/usr/bin/expect set flag 8888 puts "xxx $flag" send "echo $flag > /tmp/1\r" lyang001@lyang001-OptiPlex-9010:~/updates/$ ./zz.sh xxx 8888 lyang001@lyang001-OptiPlex-9010:~/updates/$ cat /tmp/1 ... (1 Reply)
Discussion started by: yanglei_fage
1 Replies
yppasswd(1)						      General Commands Manual						       yppasswd(1)

NAME
yppasswd, ypchfn, ypchsh - change your password in the NIS database SYNOPSIS
yppasswd [-f] [-l] [-p] [user] ypchfn [user] ypchsh [user] DESCRIPTION
The standard passwd(1), chfn(1) and chsh(1) cannot be used under Linux to change the users NIS password, shell and GECOS information, because they only modify the password file on the local host. For changing the NIS information, they are replaced by their NIS counter- parts, yppasswd, ypchfn and ypchsh. These commands are the same program, linked to different names. Using the command line switches, you can choose whether to update your password -p, your login shell -l, or your GECOS field -f, or a combination of them. yppasswd implies the -p option, if no other option is given. If you use the -f or -l option, you also need to add the -p flag. ypchfn implies the -f option, and ypchsh -l. When invoked without the user argument, the account information for the invoking user will be updated, otherwise that of user will be updated. This option is only available to the super-user. If the yppasswdd daemon on the server supports it, you can give the root password of the server instead of the users [old] password. All tools will first prompt the user for the current NIS password needed for authentication with the yppasswdd(8) daemon. Subsequently, the program prompts for the updated information: yppasswd or -l Change the user's NIS password. The user is prompted for the new password. While typing the password, echoing is turned off, so the password does not appear on the screen. An empty password is rejected, as are passwords shorter than six characters. The user will then be requested to retype the password to make sure it wasn't misspelled the first time. ypchsh or -l Change the user's login shell. The user is prompted for a new shell, offering the old one as default: Login shell [/bin/sh]: _ To accept the default, simply press return. To clear the shell field in your passwd(5) file entry (so that the system's default shell is selected), enter the string none. ypchfn or -f Change the user's full name and related information. Traditionally, some applications expect the GECOS field (field 4) of the passwd(5) file to contain the user's real name (as opposed to the login name) plus some additional information like the office phone number. This information is displayed by finger(1) and probably some other tools, too. When setting the full name, ypchfn displays the following prompts, with the defaults in brackets: Name [Joe Doe]: Location [2nd floor, bldg 34]: Office Phone [12345]: Home Phone []: To accept a default, simply press return. To clear a field, enter the string none. SEE ALSO
chfn(1), chsh(1), finger(1), passwd(5), passwd(1), ypcat(1), yppasswdd(8), ypserv(8), ypwhich(1) AUTHOR
yppasswd is part of the yp-tools package, which was written by Thorsten Kukuk <kukuk@suse.de>. YP Tools 2.7 May 1998 yppasswd(1)
All times are GMT -4. The time now is 05:06 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy