Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > Perl > EXPECT module, howto to perform a "new page" ?

Reply
Thread Tools

EXPECT module, howto to perform a "new page" ?

 
 
z0mb1e_fr
Guest
Posts: n/a
 
      11-28-2003
I am writing a script to change a router config.
The config is long and the result is that the display stops with a
"--more--".

Normally we type return to go to a new line or the space bar to go to
scroll down a page.

So far I failed to simulate this behaviour with expect.

The program performs a loop with:
....
....
$router->expect($timeout, "-re" , "--More--"))
print $router "\f";
....
....

I tried "\f", "\s", "\f\r", "\r", nothing works.

How can I tell expect to strike the "space bar" ?

Thanks,

Antonin
 
Reply With Quote
 
 
 
 
Bill
Guest
Posts: n/a
 
      12-01-2003
http://www.velocityreviews.com/forums/(E-Mail Removed) (z0mb1e_fr) wrote in message news:<(E-Mail Removed). com>...
> I am writing a script to change a router config.
> The config is long and the result is that the display stops with a
> "--more--".
>
> Normally we type return to go to a new line or the space bar to go to
> scroll down a page.
>
> So far I failed to simulate this behaviour with expect.
>
> The program performs a loop with:
> ...
> ...
> $router->expect($timeout, "-re" , "--More--"))
> print $router "\f";
> ...
> ...
>
> I tried "\f", "\s", "\f\r", "\r", nothing works.
>
> How can I tell expect to strike the "space bar" ?
>


What is a space character? try typing ' '.

Why is this needed anyway? Most programs will not do the --more--
thing if they are redirected to a file--why not redirect to file and
the read the file?
 
Reply With Quote
 
 
 
 
z0mb1e_fr
Guest
Posts: n/a
 
      12-03-2003
(E-Mail Removed) (Bill) wrote in message news:<(E-Mail Removed). com>...
> (E-Mail Removed) (z0mb1e_fr) wrote in message news:<(E-Mail Removed). com>...
> > I am writing a script to change a router config.
> > The config is long and the result is that the display stops with a
> > "--more--".
> >
> > Normally we type return to go to a new line or the space bar to go to
> > scroll down a page.
> >
> > So far I failed to simulate this behaviour with expect.
> >
> > The program performs a loop with:
> > ...
> > ...
> > $router->expect($timeout, "-re" , "--More--"))
> > print $router "\f";
> > ...
> > ...
> >
> > I tried "\f", "\s", "\f\r", "\r", nothing works.
> >
> > How can I tell expect to strike the "space bar" ?
> >

>
> What is a space character? try typing ' '.
>
> Why is this needed anyway? Most programs will not do the --more--
> thing if they are redirected to a file--why not redirect to file and
> the read the file?


I tried that already.
However I read line by line '\r\n' and that works fine.

Antonin
 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
How to perform a timing simulation in Modelsim with QuartusII output file ? ALuPin VHDL 13 11-27-2008 05:05 PM
how to expect eof with expect+pty Simon Strandgaard Ruby 4 12-20-2006 04:00 PM
Bug in $obj->expect() ... ? (Expect 1.15) Phil Perl Misc 0 07-07-2006 07:25 AM
TB 1.0.6 - How do you add files types and actions to the "Automatically perform" section? Z@no.spam Firefox 4 01-02-2006 04:38 PM
Playstation -I perform MINOR Repairs for $25 or less Roy Galutia Cisco 0 08-06-2004 03:53 AM



Advertisments