in reply to Re^3: How to pass --MORE--
in thread How to pass --MORE--

Hi, the vendor is Audiocodes,mediant 800 I don't know the other details about the device. We just try to make telnet with perl and get configuration backup to a txt file. it runs show running config command. thanks.

Replies are listed 'Best First'.
Re^5: How to pass --MORE--
by salva (Canon) on Feb 15, 2015 at 09:21 UTC
    The documentation I have found for those devices (here and here) is not very friendly. In any case, they look too sophisticated to lack a setting to disable pagination. What do you get when you run help at the CLI?

    Anyway, supposing pagination can not be disabled, I would try the following ways:

    1. You may be able to download the configuration file through the web interface. Even if that means doing some web-scraping, getting the file would be a reliable operation.

    2. Those devices support the TR-069 management protocol (a SOAP interface). If it is enabled you could also use it to download the configuration file.

    3. Maybe, the file is also downloadable using TFTP or SCP.

    4. Finally, you can use some module as Expect or Net::Telnet to send the command to the device and then repeatedly wait for the --MORE-- prompt and send CRLFs. Then you will have to remove the prompts from the output, but be careful, because it would be easy to mangle the configuration.