ryalagikar has asked for the wisdom of the Perl Monks concerning the following question:
Hi All,
Am using Expect.pm in my script, and am setting 'exp_internal', 'log_file' values. Still output is not redirecting to he file.
$expect->exp_internal(1); $expect->log_file("/tmp/expect.log", "w");
I want below lines into file.
Starting EXPECT pattern matching... at /usr/local/share/perl5/Expect.pm line 597 Expect::expect('Expect=GLOB(0x2ae3d80)', undef, 'ARRAY(0x2ae42 +18)') called at /products/backend/***/expect3.pl line 86 handle id(9): list of patterns: #1: -re `[\r\n]?[^\r\n]+[%#>$] $' handle id(9): Does `' match: pattern #1: -re `[\r\n]?[^\r\n]+[%#>$] $'? No. handle id(9): Does `\033]0;user1@da3p-host-**-aut001:~\007\033[?1034h[ +user1@da3p-host-**-aut001 ~]$ ' match: pattern #1: -re `[\r\n]?[^\r\n]+[%#>$] $'? YES!! Before match string: `' Match string: `\033]0;user1@da3p-host-**-aut001:~\007\033[?1034h[u +ser1@da3p-host-**-aut001 ~]$ ' After match string: `'
Thanks in advance
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Redirect expect screen output to file
by u65 (Chaplain) on Oct 08, 2015 at 12:46 UTC | |
by ryalagikar (Novice) on Oct 09, 2015 at 07:02 UTC | |
by u65 (Chaplain) on Oct 09, 2015 at 12:11 UTC | |
by u65 (Chaplain) on Oct 09, 2015 at 14:27 UTC | |
by ryalagikar (Novice) on Oct 12, 2015 at 05:59 UTC | |
by u65 (Chaplain) on Oct 12, 2015 at 12:27 UTC | |
by ryalagikar (Novice) on Mar 02, 2016 at 11:49 UTC |