10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
Hello Geeks once more,
Thanks for all the help you have been rendering..
I have a script that depends on the output of an expect statement but sometimes the main script misbehaves which I believe is a result of SSH communication error, how can I apply an error control to know whether the... (2 Replies)
Discussion started by: infinitydon
2 Replies
2. Shell Programming and Scripting
Hi,
Can anyone please help me with the below script, I'm trying to match the prompt output in "if statement" if it matches then send "y" else send "n" and come out. I'm not sure about the expect syntax. pls help me out.
#!/usr/bin/expect -f
set INPUT
set timeout 60
spawn su - xxuser ... (0 Replies)
Discussion started by: Jai ganesh
0 Replies
3. Shell Programming and Scripting
Hello. I have several domains which are using different LDAP trees. To make life easier i wrote such script
!#/bin/bash
case $1 in
"doman1")
login='login1'
password='pass1'
"doman2")
login='login2'
password='pass2'
"doman3")
login='login3'
password='pass3'
/usr/bin/expect... (2 Replies)
Discussion started by: urello
2 Replies
4. Shell Programming and Scripting
Do expect script have "or" statement?
sound like this:
expect {
"A" or "B" {
send "123"
}
"C" {
send "567"
}
I know expect can separate that to do this
expect {
"A" { send "123" }
"B" { send "123" }
"C" { send "567" }
} (8 Replies)
Discussion started by: sk860811
8 Replies
5. Shell Programming and Scripting
Hi,
I am new to expect script and I am having difficulty in adding an if statement into a expect FTP login script. Here is the code:
#!/usr/local/bin/expect -f
set FTP_SITE
set FTP_USER
set FTP_PASS
set FTP_FILE
spawn ftp
match_max 100000
expect -exact "ftp> "
send -- "open... (1 Reply)
Discussion started by: jrcai
1 Replies
6. Shell Programming and Scripting
Hi everyone,
I have a script in which i need to add some codes.Right now my scripts takes table name from i/p file data.txt then matches it with data in another file table.if table exists then it searches for line cotaining "add" and extract column from there.Now i need to do additional part in... (0 Replies)
Discussion started by: alisha
0 Replies
7. Linux
Ok, so I have this script that was provided to me by one of the posters on this site.
This script seems to be perfect. However, since this is a telnet script, i need to add an if then statement to it but dont know how to do it.
What i want to do is to have this script spit out a certain... (3 Replies)
Discussion started by: SkySmart
3 Replies
8. Shell Programming and Scripting
Hi,
I have a script which is logging in to network devices via ssh using expect programming.
My problem is that if I do
Code:
ssh host -l uname
It only works if y ssh_config is setup to use Protocol 1,2 and my network device I am trying to connect has ssh 1 but not 2. If the... (0 Replies)
Discussion started by: kminev
0 Replies
9. Shell Programming and Scripting
This Expect script provides expect with a list of IP addresses to Cisco IPS sensors and commands to configure Cisco IPS sensors. The user, password, IP addresses, prompt regex, etc. have been anonymized. In general this script will log into the sensors and send commands successfully but there are... (1 Reply)
Discussion started by: genewolfe
1 Replies
10. Shell Programming and Scripting
Hello to all...this is my first post (so please go easy). :)
I feel pretty solid at expect scripting, but I'm running into an issue that I'm not able to wrap my head around. I wrote a script that is a little advanced for logging into a remote Linux machine and changing text in a file using sed.... (2 Replies)
Discussion started by: v1k0d3n
2 Replies