Even though the switch /router is waiting for a prompt the ---More--- or Press Ctrl+C etc etc, by returning a carriage return or inserting a new line char at the end of your command and the next paged content turns up. Ex: $telnet->cmd('xxxxxxxxxxx'); #If this lines throws an error stating command timed-out, its because your script is waiting for the response from the device you tried to telnet while your device is waiting for a response from the user(Script in this case) which leads to waiting on both the ends and times out. So it can be solved by adding a \n or \t or \r character in the command. Ex: $telnet->cmd('xxxxxxxxxxx\n\r\t');# In this case its similar to the user or script hitting an enter key after the entire command is typed. Now if there are 5 pages in the telnet ouput, append 5 "\n" or "\r" or "\t". Well if there are 7 pages make append count to 7
In reply to Re: Problem with telnet and paging
by Anonymous Monk
in thread Problem with telnet and paging
by anton
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |