I've made a little script to capture the output of networking devices. Everything works fine, until I use the "show tech" command in an Cisco device. The script does not save anything form the "show tech", but I can see that the TELNET Session gets back some output. But I can't figure out how to save this output from "show tech" into a file. There is no problem with commands which produce smaller output. Here is the part, that does not work the way I want:
(P.S.: ":" is an replacement for the "greater sign")
my $prompt = $hostname."#";
$telnet -: prompt("/$prompt\$/");
@output = $telnet-:cmd(String =: "$command", Timeout=:30);
printf "@output\n\n"; # No output is using "Cisco's show tech"