Caputure Telnet output from a script?

djheater

Lifer
Mar 19, 2001
14,637
2
0
I have a bunch of boxes and each has a print server hooked up to it, I want to query the firmware revision via a telent session and capture that output to a file.

Is there a way to script a telnet session and capture the output?

TIA
 

djheater

Lifer
Mar 19, 2001
14,637
2
0
Luckily when I logon the device I get the info I'm looking for as a response, so I can use the client side logging switch to create a file to parse for the info I'm looking for.

TELNET -f file.txt


I would still like to know how to enter telnet commands from a batch file if anyone knows...