01-30-2009
While it's somewhat difficult to control the spawned processes output, you can use stty -echo to turn off echoing and spawn -noecho to prevent the sub-shell command from being echoed. You can also look at: set stty_init "-echo"
But depending on the case, you might not get what you are wanting.
10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
Hi,
Does anybody know how to change the password on multiple servers with a script. I have 300 Sun boxes and the password expiry is set to 30 days. Im in a process to build a script using expect. Need a help from an expert who has already done it.
Regards,
Vinod (1 Reply)
Discussion started by: chellam
1 Replies
2. Shell Programming and Scripting
Could someone please help me...I have an expect script. There's a need for a log in during the script and a password is required...right now the password is just a variable in the expect script...what would be the best way to put that in an encrypted flat file and have the expect script pull the... (2 Replies)
Discussion started by: cubs0729
2 Replies
3. Programming
I try following code under Solaris10,like follows:
int glob = 6;
int main(void)
{
int var;
pid_t pid;
var = 88;
printf("before vfork\n");
if ((pid = vfork()) < 0) {
err_sys("vfork error");
} else if (pid == 0) {
glob++;
var++;
_exit(0);
}
... (1 Reply)
Discussion started by: konvalo
1 Replies
4. Shell Programming and Scripting
what i need is that after passwordless enter another program should execute. I can succeed passwordless login but ı could not execute (./son) program. pls help me (6 Replies)
Discussion started by: fozay
6 Replies
5. Shell Programming and Scripting
All,
I am trying to use expect to send SFTP password because I am unable to share a key with the vendor.
They gave me a password that uses some symbols in it like $ and !
When i try to use the send command in expect it thinks the $ is a variable.
Is there anyway to have it send the... (2 Replies)
Discussion started by: markdjones82
2 Replies
6. Shell Programming and Scripting
Hi.
Here is beginning of my script
#!/usr/local/bin/expect --
set timeout 15
spawn /usr/local/account.sh -n modify
expect "Password:" {send "mypassword\r"}
But due to some terminal control sequences (or something else, dunno exactly) my password prompt is looking like this:
and expect... (3 Replies)
Discussion started by: urello
3 Replies
7. Shell Programming and Scripting
Hello all.
I am a linux and linux scripting newbie so please forgive my ignorance. I have been tasked to write what I thought should be a pretty simple script that does the following:
1) Loads our forticlient ssl vpn command line client
2) sends the vpn password to the client
Pretty... (2 Replies)
Discussion started by: wblakenc
2 Replies
8. Shell Programming and Scripting
Code Broken!!
"cod generator ip=$loja"
expect -c "
# set timeout -1
set timeout 18
spawn scp -C /etc/samba/arkivo.sh root@$loja:/etc/samba/
expect { -re "*yes/no*"{ send "yes\r"
exp_continue }
-re "*password:*" {
send "senha\r"
expect \"*#*\"}}
ssh root@$loja
expect \"*password:*\"... (4 Replies)
Discussion started by: hrenechen
4 Replies
9. Shell Programming and Scripting
I have a script that does an SSH into a remote node. It should expect the prompt and send the password.
#!/usr/bin/expect
set user ;
set pass ;
spawn ssh $user@E-Internal
expect {
-re "RSA key fingerprint" {send "yes\r"}
timeout... (1 Reply)
Discussion started by: Junaid Subhani
1 Replies
10. Shell Programming and Scripting
Newbie here. My goal is to have the expect script log into the Ubuntu 18.04 server and run two commands (lsb_release -a and ip addr) and eventually pipe the output/results to a file. For now, I would be happy to get this one command or two to run successfully. How to fix this?
#!/usr/bin/expect ... (3 Replies)
Discussion started by: jacob600
3 Replies