From: Freddy C. <fre...@gm...> - 2010-10-12 14:52:56
|
Hi, I am trying to clear the contents of the accumulator and then execute the command and then capture the contents of the command via the expect log file. I am getting the output of the previous accumalator contents even after clearing them Code. $expect_handle->send("1st Command to be executed"); $expect_handle->clear_accum(); $expect_handle->log_file(undef); $expect_handle->log_file("expect_output_file","w"); $expect_handle->send("2nd Command to be executed"); $expect_handle->expect(undef,"prompt"); $output = `cat expect_output_file`; $output contains the output of the previous command ( e.g 1st command ) instead of the output of the 2nd command . I need $output to contain only the output of the 2nd command. Regards, Freddy |