Hi guys, i have a script that logs into a range of hosts and runs an update involving apt-get: apt-get update
problem i'm having is, before i do the apt-get, i do a apt-get update. and this process is completed quickly for most servers. but some servers, it can take a while.
my expect script aborts and moves on to the next server if the update isn't done quickly.
i know that the option for "timeout" can be used. but that isn't working as expected. when i use timeout, the script logs into the server, then does nothing until the timeout specified has expired. then it runs the commands its suppose to run. this is not good. i want the script to log into the server, immediately run the command, then exits out of the system only if the command has completed.
Hello everyone,
I was wondering if any of you could help me with this. I am an absolute beginner and don't know how to program, but I can follow a tutorial and tweak code sometimes. My understanding of programing is limitted to what for and while loops do, and how if then else logic works. That... (2 Replies)
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)
i tried to take a backup by using fbackup command. But it exactly aborted after taking backup of 2GB data. pleasse guide me how should i proceed to overcome this problem.
The command i used is:
fbackup -0 -y -f /dir1 \
-g fbackup_graph \
-c fbackup_config
... (6 Replies)
Hello
I want use bash_completion on a script but the information on the internet give me not a solution.
The scrip start with "cd" to a direction
Than the script do "ls"
Than I must give a name of a sub-direction and here I want to use <TAB>, so when I have a direction with the name
smith... (2 Replies)
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)
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)
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)
Hi everyone!
I am running Slackware 12.1 and the past few days I have this problem:
Whenever I use pkgtool to install an update, I get this message:
/sbin/installpkg: line 231: 3967 Aborted /sbin/ldconfig
I tried ldconfig but it aborts.
Any ideas would help,
Thanks... (2 Replies)
Hi,
OS - Unix
Iam doing the following:
after login to the unix box
1. change directory
2. run a shell script "preinstall.sh"
3. This takes apprx 5 mins
4. after which i use to change permission of a file "installhub.sh" (this file is generated from the previous step).
Is there anyway... (2 Replies)
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)