I am halfway writing an Expect script on a Linux server that must use telnet for the router to collect some system information. So far, my script can successfully complete the connection, run the router command, disconnect and shut down.
The command displays a few lines that I need to parse, and I'm not sure how to do this in Expect. How can I save the output, grep a row, then a column from a row, and finally save the result in a file? If possible, I would like to use Expect as a whole, and not work (for example, Expect is inserted into Bash).
Thank you for your time. jk04
source
share