10 More Discussions You Might Find Interesting
1. UNIX for Beginners Questions & Answers
Hi; problem may be obvious, simple but I have to say it is somehow not easy to locate the issue.
I am doing some word extracting from multiline text.
Interacting in CLI seems to work without issues. First step is to add multiline text to a variable.
expect1.1>
expect1.1> set... (2 Replies)
Discussion started by: aldowski
2 Replies
2. Programming
I'm fairly new to scripting so this might not be possible.
I am using Expect with Cisco switches and need to capture the string after finding the expect request. For example, when I issue "show version" on a Nexus switch, I'm looking to capture the current firmware version:
#show version
... (0 Replies)
Discussion started by: IBGaryA
0 Replies
3. Shell Programming and Scripting
Hi,
I am trying to create an ssh script to login to cisco routers and activate/deactivate bgp neighbors if they match certain conditions. I dont think my "if" and "foreach" are working correctly. Any help is appreciated. Below is my script:
... (0 Replies)
Discussion started by: blahblahsomeone
0 Replies
4. Shell Programming and Scripting
Hi experts
I know the expect script can match the terminal output to run the the following cmd
I write a script with expect named "test", I want to run ten "test" with background running,
for ((i=1;i<=10;i++)
do
./test -n $i
done
I find all the output of test will print on one... (0 Replies)
Discussion started by: yanglei_fage
0 Replies
5. 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
6. Shell Programming and Scripting
Hi Gurus,I am trying to automate SFTP using expect.I have written a script that logs into a few boxes(one after the other) and pulls a few files from them.The code:#!/bin/kshcat serverlist.conf|wc -l >> tmp #serverlist.conf contains the list of servers.tmp1=$tmpfor tmp1 in listdo while read... (3 Replies)
Discussion started by: Hari_Ganesh
3 Replies
7. Solaris
Hi Experts,
I am learning expect and wrote the below script for automatic sftp into a server:
#!/usr/local/bin/expect -f -d
spawn sftp -v test@mumux503 # logs into mumux503 as test user
expect "password:"
sleep 20
send "test\r"; # sending the password for test... (3 Replies)
Discussion started by: Hari_Ganesh
3 Replies
8. Shell Programming and Scripting
This is my expect script .
set USERNAME
set PASSWD
set IP
set timeout 15
spawn telnet $IP
expect "login:"
send "$USERNAME\r"
expect "Password:"
send "$PASSWD\r"
expect "Password:"
send "$PASSWD\r"
expect "*\>"
send "show version\r"
expect "*\>"
send "quit\r"
ouput of it (0 Replies)
Discussion started by: robbiezr
0 Replies
9. 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
10. Shell Programming and Scripting
HI Al,
I have written the following expect script:
#!/bin/ksh
#!/usr/local/bin/expect--
##echo "PLease enter the server name"
##read host
echo "please enter the instance"
read instance
set ##password to be entered right before the script is run##
##/usr/local/bin/expect<<-EOF
cat... (2 Replies)
Discussion started by: Segwar
2 Replies