LINUX.IE, website of the Irish Linux Users' Group
Tux rules!

   
Home
New Users
Articles
Download
Projects
Community
Vendors

  Print Version
Email to...
 
Archives:


planetILUG

Recent News

News Archive


Join the
ILUG
on FaceBook


Join the
ILUG
on LinkedIn


Join the
ILUG SETI
Group



















 
 :: Mailing Lists

[ILUG] Perl Question.

[ILUG] Perl Question.

Martin Pegman pegmanm at gmail.com
Wed Jun 8 12:34:39 IST 2005


Thanks Niall,
It was how it was being passed to the expect script.! When the system
line was changed to pass all the args in one line i.e.
system ("/root/grab\-config  $_  NetHop\-TFTP\-Access J65RFKJ86YT
82\.198\.129\.83  $_");

it came back fine.

Thanks again. 
Once more saved from beating my head of the walls by ILUG.
Martin P

On 6/8/05, Niall O Broin <niall at magicgoeshere.com> wrote:
> On 8 Jun 2005, at 11:11, Martin Pegman wrote:
> 
> > 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.
> 
> What do you mean exactly ? Does the perl script not actually run the
> expect
> script  /root/grab\-config  for you?
> 
> > As you can see form the script I'm new to Perl so any pointers or
> > better ways to do this are appreciated.
> 
> Well, you're escaping too much, but better too much than too little :-)
> and you have a couple of tautologies, but no matter - that script
> appears to do what you appear to want :-) So, the first thing to figure
> out is if the expect script is actually getting called at all. the next
> thing to look at is how you've split up the arguments to system - you
> could try putting them all into one string.
> 
> 
> 
> Niall
> 
> --
> Irish Linux Users' Group
> http://www.linux.ie/mailman/listinfo/ilug/
> 
> 


-- 
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.



More information about the ILUG mailing list
Read this without the formatting.
                                                                                                    

 

Hosted by HEAnet


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!
RSS Version
Powered by Dell