Thanks
it seem that there also was a small issue with telnet'ing to an
win2k machine , where it asks for the Terminal emulation which it needs to
display the stdout.
So when I added the expect and sends for that and the interactive() , it
works.
Cheers G.
-----Original Message-----
From: Roland Giersig [mailto:RGi...@a1...]
Sent: Friday, December 07, 2001 9:13 AM
To: Maloney Gerard
Cc: exp...@li...
Subject: Re: [Expectperl-discuss] RE: problems with spawn
> In a cywin window or even in a DOS box, I execute the following ,
> but the
> spawn command seems to fork off a new session which I cannot see.
Yes, that's intended behaviour. You can control that session by
sending to it and expecting on its output.
> How can I get it to work so that the telnet session is active in
> the current window ?
Use interact(). This connects the process with the scripts stdin/out
(your terminal). BTW, storing passwords in cleartext has security
implications and should be avoided wherever possible. Maybe you could
use ssh instead?
Hope this helps,
Roland
--
RGi...@cp...
|