I have a perl script that is called with a router name command list file and output file. The command file can be very large, up to 3k of commands. At first I dumped the command list file to an array and ran the entire file on the router and captured the output. It worked ok for a command list in the hundreds but not thousands. So I changed it to the below to read each line of the command list and wait for a prompt.
It works well but since I am a perl beginner I was hoping some experienced perl people can have a look and see if this can be done any better.
All
Please help, i will telnet to router to obain the ping status and compare, if higher than normal latency, i will have further action..
if i do the telent and in perl script then ....
e.g the result i obtain from the router will be =' Success rate is 100 percent (5/5), round-trip... (4 Replies)
I want to make a Perl script to telnet to a router and apply commands, and get the output of the commands in a file.
Can any one help me in that? (2 Replies)
Somewhat long story:
I have a simple Perl CGI script that uses Expect to Telnet to a device and grab some data, and then spits it back to Perl for display on the Webpage.
This works for many devices I've tried, but one device just fails, it keeps rejecting the password on this device, only... (1 Reply)
I need a command, which could run mutliple commands from a file.
Let's say, I have
mv fileA1 fileB1
mv fileA2 fileB2
.....
mv fileA20 fileB20
I put these commands in a file, then I need a command to run the file as a whole so that I don't need to type 20 times...
Anyone tell me how to... (8 Replies)
Hi all,
Can you guys please help me with this...
I am on AIX and need to prepare a script which will
1. check for a file named do_backup in the current file system
2. If the file exists i need to run some commands and exit, if the file doesn't exist then sleep for 15 mins and try... (2 Replies)
I am trying to write a shell script to execute some commands..
telnet <IP address of the router>
wait 10
echo "username"
echo "password"
sh log
exit
but i am unable to execute it properly ..please help me ..
thanks in advance
Sri (1 Reply)
I am trying to write a script for my own use that will allow me to connect to network devices, then run a set of commands.
I start with a list of ips in a text file. Each ip is on its own line.
I start with a second file of commands. Each command on one line.
for illustration .. the cmd.txt... (2 Replies)
Hello,
I have standard loop
while read -r info; do
command $info
done < info
in info text file I have multiple commands each on line that I want to execute. When I used them in console they worked, but not with this loop.
This is one of the commands in info file:
grep... (4 Replies)
Linux System having all Perl, Python, PHP (and Ruby) installed
From a Shell script, can call a Perl, Python, PHP (or Ruby ?) file
eg
eg
a Shell script run in a case statement call to run a php file, also Perl or/and Python file???
Like
#!/usr/bin/bash
....
....
case $INPUT_STRING... (1 Reply)
I am new in scripting,
I need script(BASH) which do telenet to one of the elements & run few commands , after running it successfully it will check status of files & exit.
Help is greatly appreciated 🙏 (2 Replies)
Discussion started by: Vinesh_123
2 Replies
LEARN ABOUT DEBIAN
rancid-cvs
rancid-cvs(1) General Commands Manual rancid-cvs(1)NAME
rancid-cvs - initialize CVS or Subversion and rancid group files and directories
SYNOPSIS
rancid-cvs [-V] [group [group ...]]
DESCRIPTION
rancid-cvs creates the directories and router.db(5) for each rancid group and handles the revision control system (CVS or Subversion) set-
up. It must be run after installation and whenever a rancid group is added.
rancid-cvs reads rancid.conf(5) to configure itself, then proceeds with the initialization. First of the CVS or Subversion repository, if
necessary, and then for each of the rancid groups listed on the command-line or those in the variable LIST_OF_GROUPS from rancid.conf(5),
if the argument is omitted.
Running rancid-cvs for groups which already exist will not cause problems. If the group's directory already exists, the import into the
revision control system will be skipped, and if it's router.db(5) already exists, it will not be altered.
The command-line options are as follows:
-V Prints package name and version strings.
The best method for adding groups is add the group name to LIST_OF_GROUPS in rancid.conf(5), then run rancid-cvs. Do not create the
directories manually, allow rancid-cvs to do it.
SEE ALSO cvs(1), rancid.conf(5), router.db(5), svn(1)
5 October 2006 rancid-cvs(1)