Re: Perl Expect .. getting output of command

2005-06-16 Thread Ramprasad A Padmanabhan
Randal L. Schwartz wrote: "Ramprasad" == Ramprasad A Padmanabhan <[EMAIL PROTECTED]> writes: Ramprasad> $exp->expect(1); This means "wait at most 1 second for *any* output". Yes I thought for a simple command like date that should be OK even If I put $exp->expect(1,/.*2005.*/s) I get no ou

Re: Perl Expect .. getting output of command

2005-06-15 Thread Randal L. Schwartz
> "Ramprasad" == Ramprasad A Padmanabhan <[EMAIL PROTECTED]> writes: Ramprasad> $exp->expect(1); This means "wait at most 1 second for *any* output". Do you really want to do that? Perhaps you should be waiting for a newline or something. -- Randal L. Schwartz - Stonehenge Consulting Serv

Perl Expect .. getting output of command

2005-06-15 Thread Ramprasad A Padmanabhan
I am using perl Expect to spawn a shell, run date and get its output .. I am not getting the full output of date Here is the script, can someone tell me where am I going wrong ? #!/usr/bin/perl use Expect; my $exp = Expect->spawn('bash'); print $exp->send("date\r"); $exp->expect(1); my $str =