Re: Regular expressions
From: adey (adey_at_forge.co.uk)
Date: 10/28/03
- Previous message: Chris: "Can't do setuid and file permission denied"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Date: Tue, 28 Oct 2003 12:37:13 +0000 (UTC)
On Sun, 29 Jun 2003 21:05:50 -0500, "mark" <mark_evans029@yahoo.com>
wrote:
>i am attempting to write a script using Net::Telnet. The script telnets to
>a machine
>logs in and issues a command to list the config. Tthe output of the command
>pauses
>about every screenfull and gives the user the prompt " --More-- ". The
>script
>contains the followin code to account fot the prompt.
>
>$telnet->waitfor('/-\-More\-\- $/i');
>$telnet->print('\s');
>
>the script does not proceed past the " --More-- " prompt. this problems
>seems to have stumpt me. does anyone have any suggestions for me?
>
>Thanks
>mark
>
>
Hi Mark,
I use the module all the time. The non Perl solution to your problem
is this;
I would suggest you command the machine to dump the whole of the
config in one go.
For instance, if you are attempting to list the config on a Cisco
router, you could issue the command "term len 0" prior to issuing the
command to list the config.
Adey
- Previous message: Chris: "Can't do setuid and file permission denied"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Relevant Pages
|
|