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
how do i modify the following:
echo "jaba law welcome no jaba law sorry now jaba law" | awk '{s+=gsub(/jaba law/,"jaba law")} END {print s}'
so that it shows me the actual phrase it found matching the strings i specified?
something like:
jaba law jaba law jaba law (4 Replies)
Discussion started by: SkySmart
4 Replies
4. 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
5. 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
6. 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
7. 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
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
I am using expect
I dont know tcl but trying to use a control statement to send requests from an input file - dont know what I am doing to be honest as I dont know tcl and dont use expect too much...
Any help?
See below
Basically I am opening a telnet session to a server which works fine... (2 Replies)
Discussion started by: frustrated1
2 Replies