Hi all,
I have a little perl script to grab IP addresses form a hostname file
and pass them
one by one to a working expect script to pull config from cisco routers etc.
If I change the system line in the script (below) and paste the single
line output
to the shell all works fine. However the perl script just disapears
with no errors.
As you can see form the script I'm new to Perl so any pointers or
better ways to do this
are appreciated.
Thanks
Martin P
#
use strict;
open (FILE, "<./hostname") or die "Can't open file: $!for reading";
#print ("THIS IS Before the action starts\n");
while (defined($_ = <FILE>)) {
#print "getting config from here $_\n";
chomp $_;
system ("/root/grab\-config ", $_, " NetHop\-TFTP\-Access J65RFKJ86YT
82\.198\.129\.83 ", $_,);
sleep 3
}
#print ("This is after the action\n ");
close (FILE);
--
The means by which we live have outdistanced the
ends for which we live. Our scientific power has
outrun our spiritual power. We have guided missile
and misguided men. - Martin Luther King Jr.
Maintained by the ILUG website team. The aim of Linux.ie is to
support and help commercial and private users of Linux in Ireland. You can
display ILUG news in your own webpages, read backend
information to find out how. Networking services kindly provided by HEAnet, server kindly donated by
Dell. Linux is a trademark of Linus Torvalds,
used with permission. No penguins were harmed in the production or maintenance
of this highly praised website. Looking for the
Indian Linux Users' Group? Try here. If you've read all this and aren't a lawyer: you should be!