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 3 4905 z0*******@yahoo.fr (z0mb1e_fr) wrote in message news:<77**************************@posting.google. 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? wh******@lynxview.com (Bill) wrote in message news:<23**************************@posting.google. com>... z0*******@yahoo.fr (z0mb1e_fr) wrote in message news:<77**************************@posting.google. 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
Or you could just issue 'terminal length 0' on the router...
This thread has been closed and replies have been disabled. Please start a new discussion. Similar topics
by: Edward K. Ream |
last post by:
The docs for 2.2 and 2.3 contain a "What's new" section.
Are there any such sections for 2.0 and 2.1? If so, where are they?
Thanks.
Edward...
|
by: Leslaw Bieniasz |
last post by:
Cracow, 28.10.2004
Hello,
I have a program that intensively allocates and deletes lots
of relatively small objects, using "new" operator. The objects
themselves are composed of smaller...
|
by: mrwoopey |
last post by:
I have a asp.net application that uses the crystal report viewer
control.
It displays all of my reports but all of a sudden it started giving me
the following error on ONLY two reports:
"Fail...
|
by: NuB |
last post by:
I have a C# web form that allows the user to perform a search if all the
required fields are filled in, which works fine, my issue is if a user does
a sucessfull search then enters in data and...
|
by: Tony Sinclair |
last post by:
I'm just learning C#. I'm writing a program (using Visual C# 2005 on
WinXP) to combine several files into one (HKSplit is a popular
freeware program that does this, but it requires all input and...
|
by: Gabriele *darkbard* Farina |
last post by:
Hi,
I'm using Python 2.5 to develop a simple MVC framework based on
mod_python. To load my controllers, I create new modules using the
"new" module like this:
# ....
my_module =...
|
by: Jeff |
last post by:
I need to place a "Previous Page" link on every page within my site and
a simple javascript:history.back() will not work because I need it to
capture the state of the page when I left it. For...
|
by: Lloyd Bonafide |
last post by:
I followed a link to James Kanze's web site in another thread and was
surprised to read this comment by a link to a GC:
"I can't imagine writing C++ without it"
How many of you c.l.c++'ers use...
|
by: Medvedev |
last post by:
i see serveral source codes , and i found they almost only use "new"
and "delete" keywords to make they object.
Why should i do that , and as i know the object is going to be destroy
by itself at...
|
by: Charles Arthur |
last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
|
by: ryjfgjl |
last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
|
by: ryjfgjl |
last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
|
by: emmanuelkatto |
last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud.
Please let me know.
Thanks!
Emmanuel
|
by: nemocccc |
last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
|
by: Hystou |
last post by:
There are some requirements for setting up RAID:
1. The motherboard and BIOS support RAID configuration.
2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
|
by: marktang |
last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
|
by: Hystou |
last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
|
by: Hystou |
last post by:
Overview:
Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
| | |