If it waits for the full 30 minutes, it means that expect does not see the string you are waiting for.
You are writing
which means that you are waiting for the string "(.*)## $" to appear somewhere. I don't think this is what you want to achieve.
You can use exact, if you know the exact sequence of characters. In your case, it seems to me more natural do do an anchored regular expression matching, to cope for variations in, say, whitespace, for example
Please see it only as a suggestion to start with. I don't know what's in your output in general, and you have to judge by yourself, how to write the regexp so that you don't accidentally catch a line in your logs which looks the same.
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)
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 All,
I am writing a script(Auto_Installation.sh) which is calling one another script (./update_manager /spare/install/HO7/PME_Response_file.txt)
Now the issue is result of (./update_manager /spare/install/HO7/PME_Response_file.txt) script is
##########################################... (6 Replies)
Hi,
I have two questions,first of all is where can I collect more error logs(the log under /var/log/messages), also give the corresponding explain is grateful.The second one is the log under various versions(such as red hat,suse,etc) is the same or not.
Thanks for answers. (1 Reply)
Hi Gurus
I need to collect the logs between two time stamp... The log files 12 hours format (ex- Nov 14, 2013 12:10:16 AM UTC) I tried the below commands but no luck.
awk '$0 >= "Nov 14, 2013 9:40:01" && $0 <= "Nov 14, 2013 9:55:01"' file
sed -n '/Nov 14, 2013 7:58:00 PM UTC/,/Nov 14, 2013... (5 Replies)
Appreciate help for the below issue.
Im using below code.....I dont want to attach the logs when I ran the perl twice...I just want to take backup with today date and generate new logs...What I need to do for the below scirpt..............
1)if logs exist it should move the logs with extention... (1 Reply)
The below is my script.
/usr/bin/expect<<EOD
spawn /usr/bin/sftp -o Port=$PORT $USER@$HOST
expect "sftp>"
expect "password:"
set timout 15
send "$password\r"
expect "sftp>"
send "lcd $remotedir\r"
expect "sftp>"
... (1 Reply)
Discussion started by: Anilsaggu9
1 Replies
LEARN ABOUT DEBIAN
rancid-run
rancid-run(1) General Commands Manual rancid-run(1)NAME
rancid-run - run rancid for each of the groups
SYNOPSIS
rancid-run [-V] [-f rancid.conf] [-f rancid.conf] [-m mail_rcpt] [-r device_name] [group [group ...]]
DESCRIPTION
rancid-run is a sh(1) script to run rancid(1) for a set of rancid group(s).
rancid-run reads rancid.conf(5) to configure itself, then uses control_rancid(1) to run rancid(1) for each rancid group. The set of rancid
groups can either be provided as command-line arguments or via the LIST_OF_GROUPS variable in rancid.conf(5), if the group argument is
omitted.
A lock file is maintained per-group to prevent simultaneous runs for a given group by rancid-run(1). The lock file will be named
.<group>.run.lock and will be located in /var/lib/rancid.
A log file is produced under $LOGDIR/logs for each rancid group processed. The file name will be <group>.YYYYMMDD.HHMMSS (year month day .
hour minute second).
rancid-run is normally used to run rancid from cron(8). For example:
0 * * * * /usr/local/rancid/bin/rancid-run
The command-line options are as follows:
-V Prints package name and version strings.
-f rancid.conf
Specify an alternate configuration file.
-m mail_rcpt
Specify the recipient of diff mail, which is normally rancid-<group>. The argument may be a single address, multiple comma
separated addresses, or -m may be specified multiple times.
-r device_name
Run rancid for a single device, device_name. device_name should be name, as it appears in a group's router.db. The device must be
marked "up". If a group is not specified on the command-line, rancid will be run against any group in which the device_name
appears.
The -r option alters the subject line of the diff mail. It will begin with <group name>/<device name> rather than just the group
name alone.
ENVIRONMENT
rancid-run utilizes the following environment variables from rancid.conf(5).
BASEDIR
Location of group directories, etc. This is set to the "localstatedir" by the configure script at installation time.
LIST_OF_GROUPS
List of rancid groups to collect.
PATH Search path for utilities.
TMPDIR Directory to hold temporary files.
ERRORS
If rancid fails to run or collect a device's configuration, the particular group's log file (mentioned above) should be consulted. Any
errors produced by the revision control system (CVS or Subversion) or any of the rancid scripts should be included there, whether they be a
botched cvs tree, login authentication failure, rancid configuration error, etc. If the log file produces no clues, the next debugging
step should be run the commands manually. For example, can the user who runs rancid login to the device with 'clogin hostname', and so on.
FILES
$BASEDIR/etc/rancid.conf
rancid-run configuration file.
SEE ALSO control_rancid(1), rancid.conf(5), router.db(5)
5 October 2006 rancid-run(1)