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. IP Networking
Hi
I am new to IP configuration and using expect script
I have a requirement like
I need to write a expect script that can ssh to a remote machine(linux1) using password which already has IP, once logged inside machine need to reboot remote machine(linux1) and again login to same remote... (1 Reply)
Discussion started by: Priya Amaresh
1 Replies
4. Programming
I have an expect script called remote that I want to call from inside my expect script called sudoers.push, here is the code that is causing me issues:
set REMOTE "/root/scripts/remote"
...
log_user 1
send_user "Executing remote script as $user...\n"
send_user "Command to execute is: $REMOTE... (1 Reply)
Discussion started by: brettski
1 Replies
5. Programming
Hi,
Am very new to expect scripting..
Can You please suggest me how to call an expect script inside another expect script..
I tried with
spawn /usr/bin/ksh
send "expect main.exp\r"
expect $root_prompt
and
spawn /usr/bin/ksh
send "main.exp\r"
expect $root_prompt
Both... (1 Reply)
Discussion started by: Priya Amaresh
1 Replies
6. Shell Programming and Scripting
Hi people,
I'm having some strange behaviour with an 'expect' script.
spawn csession blah
expect "Username: "
send "userblah\r"
expect "Password: "
send "passwordblah\r"
interact
When I execute the script as root it runs perfectly.
However, when executed as any other... (0 Replies)
Discussion started by: GarciasMuffin
0 Replies
7. 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
8. Shell Programming and Scripting
Hi All,
I am trying to connect a router using Expect scripting. But my script shows error.One more thing after the command telnet localhost 2000
we should press ENTER KEY once before the command prompt asks for "enable" and password.Please help correctiong my script.
#!/usr/bin/expect --
... (2 Replies)
Discussion started by: Harikrishna
2 Replies
9. UNIX for Dummies Questions & Answers
Hi
I'm writing a script which calls an expect script to retrieve configuration files for network devices. I want to avoid using TFTP to transfer the configs if possible and so I'm redirecting the screen output to a text file.
This is the expect script:
#!/usr/local/bin/expect
set... (2 Replies)
Discussion started by: Ant1815
2 Replies
10. Shell Programming and Scripting
Hi everyone,
I use the sort from the 5.3.0 coreutils package. I have a file consisting in 5 fields
separated by a single space, with no leading or trailing blanks.
I want to sort it first according to the 4th field, which contains integers
(some of them negative), and secondly on the second... (2 Replies)
Discussion started by: chlorine
2 Replies