I need a script that connects to a device on my network and export a list of data...

#!/usr/local/bin/expect -f
spawn telnet hostname
expect -exact "Username:"
send -- "username\r"
expect -exact "Password:"
send -- "password\r"
expect "#"
send -- "command\r"
expect "#"
send -- "logout\r"`

I get some desired output but not completely. The output has more than 4000 lines and at line 80 the script gets a line " --More-- " waiting for user.

How can I get the full output?

Re: Telnet Expect Script 80 80

Is your command possibly the "more" command? Try cat.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of 1.19 million developers, IT pros, digital marketers, and technology enthusiasts learning and sharing knowledge.