Re: expect module $expect->log_file(\&captureexpectout $arg2 $arg3);

2013-02-06 Thread Brandon McCaig
On Tue, Feb 05, 2013 at 02:39:17PM -0800, Rajeev Prasad wrote: > which i am calling like this: >   > $expect->log_file(\&captureexpectout); Note that 'captureexpectout' is hard to read and hard to write properly. You should use underscores or mixed case to fix this e.g., capture_expect_out. > Now

Re: expect module $expect->log_file(\&captureexpectout $arg2 $arg3);

2013-02-05 Thread Jim Gibson
On Feb 5, 2013, at 2:39 PM, Rajeev Prasad wrote: > Hello, > > I have a working sub like this: > > sub captureexpectout { > my $data_coming_in_from_expect_call = shift; > ...do something with data.. > ... > ... > } > > which i am calling like this: > > $expect->log_file(\&captureexpectout)

Re: expect error

2008-10-23 Thread cancer
On Oct 21, 8:27 pm, [EMAIL PROTECTED] (Juan Pablo Feria Gomez) wrote: > > use strict; > > use warnings; > > use Expect; > > use IO::Tty; > > > $host = "192.168.1.72"; > > $passwd= "xyz"; > > $user = "xyz"; > > > $t= "file.txt"; > > my $connect = Expect->spawn("scp $t [EMAIL PROTECTED]:/work/$user/"

Re: expect error

2008-10-21 Thread Juan Pablo Feria Gomez
> use strict; > use warnings; > use Expect; > use IO::Tty; > > $host = "192.168.1.72"; > $passwd= "xyz"; > $user = "xyz"; > > $t= "file.txt"; > my $connect = Expect->spawn("scp $t [EMAIL PROTECTED]:/work/$user/"); > $connect->expect(30,"\s") ||die "junk1"; > print $connect $passwd."\n"; Do you

Re: expect error

2008-10-21 Thread Sandeep Kumar
Chas. Owens wrote: On Tue, Oct 21, 2008 at 09:40, Sandeep Kumar <[EMAIL PROTECTED]> wrote: hi all, i am using expect module to connect to a remote server. i am getting the following error. Cannot sync with child: Interrupted system call at /perl_path/lib/Expect.pm line 134, somebody please

Re: expect error

2008-10-21 Thread Chas. Owens
On Tue, Oct 21, 2008 at 09:40, Sandeep Kumar <[EMAIL PROTECTED]> wrote: > hi all, > > i am using expect module to connect to a remote server. i am getting the > following error. > > Cannot sync with child: Interrupted system call at /perl_path/lib/Expect.pm > line 134, > > somebody please let me kn

Re: Expect script to install sshkey

2006-03-03 Thread Peri
Ram, you have mentioned that you are using "lynx" for the download, would it be possible you to use wget/any other file retrieval utility from www rather than a information browser. -- Warm regards Peri Ramprasad A Padmanabhan wrote: Wiggins d'Anconia wrote: Ramprasad A Padmanabhan wrote:

Re: Expect script to install sshkey

2006-03-03 Thread Ramprasad A Padmanabhan
Wiggins d'Anconia wrote: Ramprasad A Padmanabhan wrote: Hi all, I have a perl Expect script that install rsa keys for ssh auto login. When I run the script on command line it works fine. Now when I run it inside a CGI the script simply gets stuck. I can see from the from the SSH server and a

Re: Expect script to install sshkey

2006-03-02 Thread Wiggins d'Anconia
Ramprasad A Padmanabhan wrote: > Hi all, >I have a perl Expect script that install rsa keys for ssh auto login. > When I run the script on command line it works fine. > Now when I run it inside a CGI the script simply gets stuck. I can see > from the from the SSH server and also the expect log

Re: Expect using expect.pm in perl

2006-02-08 Thread Owen Cook
On Wed, 8 Feb 2006, Leif Ericksen wrote: > I am working on a little project where I want to use expect in Perl, and > I am having some luck already but wanted to know what is the recommended > books to learn more about using expect in Perl. Will the Expect books > by O'Reilly be of value for thi

Re: Expect prog. doesn't work in background !

2004-07-15 Thread Andrew Gaffney
Ravinder Arepally wrote: It works from command line. Problem is when we run it as a cron job. Yes, because you have a good PATH set at the command line. Not all cron daemons will set a sensible PATH environment variable. Use full paths to executables in your perl program. For example, use '/usr/

RE: Expect prog. doesn't work in background !

2004-07-15 Thread Ravinder Arepally
It works from command line. Problem is when we run it as a cron job. -Original Message- From: Andrew Gaffney [mailto:[EMAIL PROTECTED] Sent: Thursday, July 15, 2004 12:57 PM To: beginners Subject: Re: Expect prog. doesn't work in background ! Ravinder Arepally wrote: > All.

Re: Expect prog. doesn't work in background !

2004-07-15 Thread Andrew Gaffney
Ravinder Arepally wrote: All. I wrote this perl program using Expect.pm and this program also works fine in foreground but does NOT work in background (cron job). Any help is greatly appreciated. Try using full paths to external programs. Cron doesn't always set a usable PATH when it runs script

Re: Expect-like Perl script

2002-09-30 Thread Felix Geerinckx
on Mon, 30 Sep 2002 20:52:54 GMT, Jose Malacara wrote: > Hello. I am interested in writing a Perl script that can do the > following: > > 1. read a list of user defined commands from a file > 2. telnet (or possibly ssh) to a device such as a router, login, and > interactively issue the commands

Re: expect interface in perl

2001-11-15 Thread Kilaru Sambaiah
On Thursday 08 November 2001 08:43 pm, Roy Peters wrote: > Is there any way to imbed expect commands in perl like you could in Tcl? > > Thanks. HI Roy Peters, Expect module is available for per. regards, Sambaiah Kilaru -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e

Re: expect interface in perl

2001-11-08 Thread Brett W. McCoy
On Thu, 8 Nov 2001, Roy Peters wrote: > Is there any way to imbed expect commands in perl like you could in Tcl? There is a CPAN module called Expect.pm, as a matter of fact. -- Brett http://www.chapelperilous.net/ --

RE: Expect

2001-07-31 Thread Kipp, James
yes and yes :-) Thanks > -Original Message- > From: Rachel Coleman [mailto:[EMAIL PROTECTED]] > Sent: Sunday, July 29, 2001 2:07 PM > To: [EMAIL PROTECTED] > Subject: Re: Expect > > > > Does anyone know where to find good information on the > expect modu

Re: Expect

2001-07-29 Thread Rachel Coleman
> Does anyone know where to find good information on the expect module? > the camel book did not say much about it. Try http://theoryx5.uwinnipeg.ca/CPAN/data/Expect.pm/Expect.html Found by my usual route for finding out more about a module, which is: 1. Go to www.cpan.org 2. Follow the link 'P