On Tue, Jul 20, 2010 at 10:57, Sooraj S <soorajspadmanab...@gmail.com> wrote: > Hi, > > I am using Net::Telnet module to login to a remote machine and to > perform a series of steps. In my script i am calling a shell script > which does some operations and takes almost 3 min to complete. I want > to redirect the output of that script to the console in run time, when > it is running. Is there any way to do this? > > code > ===== > $t = new Net::Telnet(Timeout => 180, Output_log => "$my_loc/my_op"); > $t->open($my_machine); > $t->login($username, $passwd); > .... > .... > .... > print $t->cmd("$my_loc/my_shell.csh") // It prints the output > after execution. > $t->close();
If you say $t->dump_log(\*STDOUT); before you call $t->cmd(), then everything that would have been written to the telnet screen will be written to the standard output. -- Chas. Owens wonkden.net The most important skill a programmer can have is the ability to read. -- To unsubscribe, e-mail: beginners-unsubscr...@perl.org For additional commands, e-mail: beginners-h...@perl.org http://learn.perl.org/