Re: Net:SSH2 v/s Expect

2014-12-01 Thread Priyal Jain
Thanks. Is Net::SSH2::Expect a stable module I want to use it for Net::Netconf. Is it supported in windows? Regards Priyal From: Eduardo mailto:edua...@eduardors.net>> Date: Tuesday, December 2, 2014 at 4:37 AM To: Priyal Jain mailto:jpri...@juniper.net>> Subject: Re: Net:SSH2 v/

Re: Net:SSH2 v/s Expect

2014-12-01 Thread Octavian Rasnita
From: Priyal Jain Hi, For establishing ssh session between client and server, which is better method: 1. Net::SSH2 : http://search.cpan.org/~rkitover/Net-SSH2-0.53/lib/Net/SSH2.pm 2. Expect : http://search.cpan.org/~rgiersig/Expect-1.15/Expect.pod What are the advantages of

Re: Net:SSH2 v/s Expect

2014-12-01 Thread shawn wilson
On Dec 1, 2014 7:02 AM, "Priyal Jain" wrote: > > Thanks, and on the basis of performance like speed and robustness which is > better?? > So I've never had the need for either - run local or remote or managed (puppet/chef or the perl solution I can't think off hand). And for performance they're pr

Re: Net:SSH2 v/s Expect

2014-12-01 Thread Nathan Hilterbrand
On 12/01/2014 04:29 AM, Priyal Jain wrote: Hi, For establishing ssh session between client and server, which is better method: 1. Net::SSH2 : http://search.cpan.org/~rkitover/Net-SSH2-0.53/lib/Net/SSH2.pm <http://search.cpan.org/%7Erkitover/Net-SSH2-0.53/lib/Net/SSH2.pm> 2. Expect

Re: Net:SSH2 v/s Expect

2014-12-01 Thread Priyal Jain
session between client and server, which is better >> method: 1. Net::SSH2 : >> http://search.cpan.org/~rkitover/Net-SSH2-0.53/lib/Net/SSH2.pm 2. >>Expect : >> http://search.cpan.org/~rgiersig/Expect-1.15/Expect.pod >> >> What are the advantages of using Net::SSH2

Re: Net:SSH2 v/s Expect

2014-12-01 Thread Shlomi Fish
Hi Priyal, On Mon, 1 Dec 2014 09:29:44 + Priyal Jain wrote: > Hi, > > For establishing ssh session between client and server, which is better > method: 1. Net::SSH2 : > http://search.cpan.org/~rkitover/Net-SSH2-0.53/lib/Net/SSH2.pm 2. Expect : > http://search.cpan.org/~rg

Net:SSH2 v/s Expect

2014-12-01 Thread Priyal Jain
Hi, For establishing ssh session between client and server, which is better method: 1. Net::SSH2 : http://search.cpan.org/~rkitover/Net-SSH2-0.53/lib/Net/SSH2.pm 2. Expect : http://search.cpan.org/~rgiersig/Expect-1.15/Expect.pod What are the advantages of using Net::SSH2 over Expect

RE: Error in installing "Bundle::Expect" as dependency for some other module using CPAN

2014-05-29 Thread Priyal Jain
org Subject: Re: Error in installing "Bundle::Expect" as dependency for some other module using CPAN Successfully installed it using "cpanm Net::Netconf". You should take a look at cpanminus, it will make your working life easier. https://metacpan.org/pod/App::cpanminus No

Re: Error in installing "Bundle::Expect" as dependency for some other module using CPAN

2014-05-28 Thread Sebastien Feugere
_ > *From:* Priyal Jain > *Sent:* Friday, May 16, 2014 2:11 PM > *To:* 'beginners@perl.org' > *Subject:* Error in installing "Bundle::Expect" as dependency for some > other module using CPAN > > > Hello, > > I am

RE: Error in installing "Bundle::Expect" as dependency for some other module using CPAN

2014-05-28 Thread Priyal Jain
, what is the issue. Regards, Thanks, Priyal _ From: Priyal Jain Sent: Friday, May 16, 2014 2:11 PM To: 'beginners@perl.org' Subject: Error in installing "Bundle::Expect" as dependency for some other module using CPAN Hello, I am

Re: Error in installing "Bundle::Expect" as dependency for some other module using CPAN

2014-05-17 Thread Shlomi Fish
Hi Priyal, On Fri, 16 May 2014 11:15:25 + Priyal Jain wrote: > Hello, > > I am getting following message when I run "cpan Net::Netconf" > > Checking if EOF on pty slave is correctly reported to master... > (this fails on about 50% of the supported systems, so

RE: Error in installing "Bundle::Expect" as dependency for some other module using CPAN

2014-05-16 Thread Priyal Jain
Hello, I am getting following message when I run "cpan Net::Netconf" Checking if EOF on pty slave is correctly reported to master... (this fails on about 50% of the supported systems, so don't panic! Expect will work anyway!) TIMEOUT Sorry, you may not notice if the spawned pro

Re: Error in installing "Bundle::Expect" as dependency for some other module using CPAN

2014-05-16 Thread Shlomi Fish
ot found for Bundle::Expect. I am mentioning > all my dependency in Makefile.Pl It's "Makefile.PL" with a capital "L" - not "Makefile.Pl". use ExtUtils::MakeMaker; our $VERSION ='0.01'; use 5.006; WriteMakefile( NAME => '

Error in installing "Bundle::Expect" as dependency for some other module using CPAN

2014-05-16 Thread Priyal Jain
Hello, I am uploading my module Net::Netconf http://search.cpan.org/search?mode=all&query=net%3A%3Anetconf in CPAN, but its giving error of dependency not found for Bundle::Expect. I am mentioning all my dependency in Makefile.Pl "use ExtUtils::MakeMaker; our $VERSION ='0.

Output of expect commands in to Strings Solved

2014-04-03 Thread Martin G. McCormick
After further study, I probably would have had to setup a named pipe to capture expect's output in to strings which would have not bought me anything useful for this situation. We needed to know what was going on with expect as it happened, not after the fact. More study shows that

Output of expect commands in to Strings

2014-04-02 Thread Martin G. McCormick
When using the expect module in a perl program, one can log expect output to a file with a command like $exp->log_file($somefilename); You can turn off STDOUT with $exp->log_stdout(0); Is there a way to capture either the file output or expect's STDO

setting expect buffer size when reading/writing to PIPE

2013-06-28 Thread Rajeev Prasad
how to set length of read buffer when expect object is a PIPE. my ($pty, $pid) = $ssh->open2pty($command); my $exp = Expect->init($pty); _now how can i set the buffer size on this object? when i print following from script, both of the following values are 0 $exp->match_max() $exp->max_accum()

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 thi

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 module $expect->log_file(\&captureexpectout $arg2 $arg3);

2013-02-05 Thread Rajeev Prasad
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);     Now I want to call this subroutine with arguments. I tried belo

how to appending to expect output ?

2012-06-19 Thread Rajeev Prasad
hello, i want to append a dynamic string stored in a variable to the beginning of each output row of the expect command, but do not know how to do it. can anyone help pl? module used is  Expect I am using this statement before i run any command on remote host, it captures EVERYTHING. I

Re: auto login to remote server using Net::SSH::Expect

2011-02-24 Thread czubatka
On Feb 23, 8:51 am, agnello.dso...@gmail.com (Agnello George) wrote: > Hi > > i am able to run  a command on the remote machine but i am not able to > completely login to the remote machine > > = > use Net::SSH::Expect; > > my $ssh = Net::SSH:

Re: auto login to remote server using Net::SSH::Expect

2011-02-23 Thread Parag Kalra
but i am not able to > completely login to the remote machine > > = > use Net::SSH::Expect; > > my $ssh = Net::SSH::Expect->new ( > host => "1.1.1.1" , > password=> "password", > user => "

auto login to remote server using Net::SSH::Expect

2011-02-22 Thread Agnello George
Hi i am able to run a command on the remote machine but i am not able to completely login to the remote machine = use Net::SSH::Expect; my $ssh = Net::SSH::Expect->new ( host => "1.1.1.1" , password=> "password", user =

Re: Need help in Expect Module

2011-02-03 Thread Zaheer Abbas
ot; > echo -n "ubuntu(default):" > read os > > case $os in > > mac) >echo "rich spoiled brat" > ;; > windoze) >echo "old arrogant user" > ;; > ubuntu) >echo "smart sexy nerd" > ;; > *) >echo

Re: Need help in Expect Module

2011-01-19 Thread Parag Kalra
erd" ;; *) echo "invalid choice" ;; esac parag@ubuntu-studio:~$ parag@ubuntu-studio:~$ cat expect.pl use strict; use warnings; use Expect; my $app = "./app register"; my @oss = qw/ubuntu mac windoze/; my $choice = $oss[rand @oss]; my $exp = new Expect; $e

Need help in Expect Module

2011-01-19 Thread Zaheer
Hi, I am trying to automate a cli application that has multiline output. I want to be able to grep for this multi line output as single string using Expect module and send some keys as input. The cli would be something like bash-3.00# /opt/myapp/bin/app register 1) someservername(1) 2

sending control-D via perl/expect

2010-07-23 Thread Noah
Hi there, does anybody know how to send control-D via perl/expect? Cheers, Noah -- To unsubscribe, e-mail: beginners-unsubscr...@perl.org For additional commands, e-mail: beginners-h...@perl.org http://learn.perl.org/

Re: perl expect script to login to multiple machines

2010-01-05 Thread perl_haxor 123
Hi all, I got the solution for this problem..the reason is that the new expect object had to be created for each machine that is $exp = new Expect has to be inside the foreach loop, in my earlier code it was outside the foreach loop.Thanks you all for the solutions..i

Re: perl expect script to login to multiple machines

2010-01-05 Thread Salvador Fandino
perl_haxor 123 wrote: Hi All, I'm new to perl and facing a problem I'm using a perl expect script to login to multiple machines (having same username and password) and execute the date command, initially i tested on one machine, it worked fine...but wh

Re: perl expect script to login to multiple machines

2010-01-04 Thread C.DeRykus
On Jan 3, 1:56 pm, perl.ha...@gmail.com (Perl_haxor 123) wrote: > Hi All, > >            I'm new to perl and facing a problem I'm using a perl > expect script to login to multiple machines (having same username and > password) and execute the date command, initiall

Re: perl expect script to login to multiple machines

2010-01-03 Thread Alvaro Mantilla Gimenez
e the foreach and > > don't do all the username/password code? > > Sometimes - like when you have a cluster of machines - it is easier and > faster to write a command once and have it execute on all the machines. > Expect is really good for this since you can just feed it a

Re: perl expect script to login to multiple machines

2010-01-03 Thread Jeremiah Foster
like when you have a cluster of machines - it is easier and faster to write a command once and have it execute on all the machines. Expect is really good for this since you can just feed it a list of machines and commands and expect just goes and does its thing. >> >> foreach ("

Re: perl expect script to login to multiple machines

2010-01-03 Thread Alvaro Mantilla Gimenez
; Hi All, > >I'm new to perl and facing a problem I'm using a perl > expect script to login to multiple machines (having same username and > password) and execute the date command, initially i tested on one machine, > it worked fine...but when i use a foreach loo

perl expect script to login to multiple machines

2010-01-03 Thread perl_haxor 123
Hi All, I'm new to perl and facing a problem I'm using a perl expect script to login to multiple machines (having same username and password) and execute the date command, initially i tested on one machine, it worked fine...but when i use a foreach loop to tes

Re: Move to more recent gcc version.. what to expect

2009-11-02 Thread Harry Putnam
Jeremiah Foster writes: [...] > Harry, this appears to be off topic since it does not deal directly > with beginner's perl questions. I think you may find better response > on a Gentoo list. Off topic and embarrassing. My 2nd time in the spc of a week. I've got to quit jumping to perl when I

Re: Move to more recent gcc version.. what to expect

2009-11-02 Thread Jeremiah Foster
On Nov 2, 2009, at 17:07, Harry Putnam wrote: I noticed I've been masking gcc beyond version 4.3.2-r3, and have forgotten why I had it masked. I'm updating world right now, and wondered if I were to move up to most recent gcc (4.4.2), which would be a 5 version jump, what I could

Move to more recent gcc version.. what to expect

2009-11-02 Thread Harry Putnam
I noticed I've been masking gcc beyond version 4.3.2-r3, and have forgotten why I had it masked. I'm updating world right now, and wondered if I were to move up to most recent gcc (4.4.2), which would be a 5 version jump, what I could expect in the way of problems. Would I need to re-e

Can perl expect can be written in just perl

2009-07-28 Thread rich . japh
Sorry for overr writng But this pop into my head while walking. -Original Message- From: "John W. Krahn" Date: Tue, 28 Jul 2009 13:07:38 To: Perl Beginners Subject: Re: Subroutine foo redefined a bar Dermot wrote: > 2009/7/28 John W. Krahn : > > Thanx for gettig back to me. > >> Whic

Re: Bundle-Expect

2009-02-20 Thread Telemachus
On Fri Feb 20 2009 @ 3:02, ramesh.marimu...@wipro.com wrote: > > Thanks Thomas. Actually when is give "use Expect;", the error I get is "Can't > locate Expect.pm in @INC ...". Is there anything that I'm missing or should I > check something? > &g

Re: FW: Bundle-Expect

2009-02-20 Thread pablo
> > Hi All, > > Another thing I found is, when I try the command "perldoc Bundle::Expect", it > displays the documentation. So it should be installed. But when I try with > "perldoc Expect", nothing is displayed. Is there any problem in the >

FW: Bundle-Expect

2009-02-20 Thread ramesh.marimuthu
Hi All, Another thing I found is, when I try the command "perldoc Bundle::Expect", it displays the documentation. So it should be installed. But when I try with "perldoc Expect", nothing is displayed. Is there any problem in the installation? Is there any way to instal

RE: Bundle-Expect

2009-02-20 Thread ramesh.marimuthu
Thanks Thomas. Actually when is give "use Expect;", the error I get is "Can't locate Expect.pm in @INC ...". Is there anything that I'm missing or should I check something? -ramesh -Original Message- From: Thomas Bätzler [mailto:t.baetz...@bringe.com] S

AW: Bundle-Expect

2009-02-20 Thread Thomas Bätzler
Hi, ramesh.marimu...@wipro.com asked: > I'm totally new to Perl. I tried installing a module Bundle-Expect.pm. > Also I called inside my Perl script by "Use Bundle::Expect". While A bundle is not a module, it's a whole collection of related modules. In this case I suspe

Bundle-Expect

2009-02-20 Thread ramesh.marimuthu
Hi All, I'm totally new to Perl. I tried installing a module Bundle-Expect.pm. Also I called inside my Perl script by "Use Bundle::Expect". While executing this script, I got an error "Can't locate Bundle/Expect.pm in @INC ...". I can't find what I'm

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"; > > > $

using Net::SSH::Expect within a thread fails

2008-10-21 Thread Andy Greenwood
;re threadable use Config; $Config{useithreads} or die('Recompile Perl with threads to run this program.'); # include the thread stuff use threads; use Thread::Queue; use Thread::Semaphore; # include the ssh stuff use Net::SSH::Expect; use Term::ReadPassword; # get the username/passwor

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/")

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, so

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,

expect error

2008-10-21 Thread Sandeep Kumar
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 know a solution for this. thanks, sandeep. -- To unsubscribe, e-mail: [EMAIL

Re: Perl Expect help

2008-05-06 Thread Juan Pablo Feria Gomez
Here's a tiny code to get the prompt, hope it helps $actualprompt=''; $rootexpect->send("\n"); my $shpromvrfy = $rootexpect->expect(750,'#','>','$'); my $match=$rootexpect->match(); my @

Perl Expect help

2008-05-02 Thread Ravi Malghan
Hi: I am trying to build a simple perl/expect program which will telnet, run a command and provide me the result of the command in a string or array to process within the script. I have gotten so far as the script telnets, runs the command the prints the result in stdout. I can't seem to f

Re: Hash of Array Does Not Return What I expect

2008-04-05 Thread Chas. Owens
On Fri, Apr 4, 2008 at 12:16 PM, Rascal <[EMAIL PROTECTED]> wrote: > I am using Perl 5.8.5 on Red Hat Linux. > > The output of the following script: > > #!/usr/bin/perl -w > @array = [0, 1, 2, 3]; snip This is creating an array with one element. The element is a reference to an array that hold

Re: hash of array does not return what I expect

2008-04-05 Thread Robert (bloo)
> The output of the following script: > > #!/usr/bin/perl -w > @array = [0, 1, 2, 3]; > $hash{0} = @array; > print "array = @array\n"; > print "hash = ", $hash{0}, "\n"; > > is: > > array = ARRAY(0x8d13c20) > hash = 1 > > I expected the results to be the same. Why aren't they? First thi

Re: hash of array does not return what I expect

2008-04-05 Thread Dr.Ruud
Rascal schreef: > The output of the following script: > > #!/usr/bin/perl -w > @array = [0, 1, 2, 3]; > $hash{0} = @array; > print "array = @array\n"; > print "hash = ", $hash{0}, "\n"; > > is: > > array = ARRAY(0x8d13c20) > hash = 1 > > I expected the results to be the same. Why aren't they?

Hash of Array Does Not Return What I expect

2008-04-05 Thread Rascal
I am using Perl 5.8.5 on Red Hat Linux. The output of the following script: #!/usr/bin/perl -w @array = [0, 1, 2, 3]; $hash{0} = @array; print "array = @array\n"; print "hash = ", $hash{0}, "\n"; is: array = ARRAY(0x8d13c20) hash = 1 I expected the results to be the same. Why aren't they? .

Re: How to install perl Expect module under cygwin

2007-10-05 Thread Javi
On Sep 23, 3:01 pm, [EMAIL PROTECTED] (Juan Pablo Feria Gomez) wrote: > Try installing manually IO::Pty before... I have no problems compiling with cl.exe, but i can´t install this module. cl.exe works fine, paths are ok. any suggest? Thanks! -- To unsubscribe, e-mail: [EMAIL PROTECTED] For add

Re: How to install perl Expect module under cygwin

2007-09-23 Thread Juan Pablo Feria Gomez
Try installing manually IO::Pty before... -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] http://learn.perl.org/

Re: How to install perl Expect module under cygwin

2007-09-23 Thread Tom Phoenix
On 9/23/07, ppp ppp <[EMAIL PROTECTED]> quoted a lengthy error message, which said in part: > ERROR: cannot run the configured compiler 'cl' > (see conf/compilerok.log). Suggestions: > 1) The complier 'cl' is not in your PATH. Add it >to the PATH and try again. OR > 2) The compiler isn't ins

How to install perl Expect module under cygwin

2007-09-23 Thread ppp ppp
Hi All, I have installed cygwin on my Windows XP machine. I want to install perl expect module but i am getting the following .error? Can any one please guide me. [EMAIL PROTECTED] ~ $ perl -MCPAN -e shell cpan shell -- CPAN exploration and modules installation (v1.7602

Re: Expect script to install sshkey

2006-03-03 Thread Peri
dmanabhan 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 logs that the login is happen

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 serve

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

Expect script to install sshkey

2006-03-02 Thread Ramprasad A Padmanabhan
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 logs that the login is happenning. But

working with expect in perl

2006-02-09 Thread Leif Ericksen
I am trying to assign the output of an expect command to a variable in my program but I am not having much luck at the moment... @cfg_dump = print $command "dump\n" does not seem to want to work. While in another program I had something like @data_gathered = `snmp $V1 $V2 $V4`

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'Reill

Expect using expect.pm in perl

2006-02-08 Thread Leif Ericksen
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 this? So far I am using the sample code fro

Re: answering prompts using expect or perl

2005-07-08 Thread JupiterHost.Net
As people have recommended to you nearing close thousands of times :) search.cpan.org for "Expect" -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] <http://learn.perl.org/> <http://learn.perl.org/first-response>

answering prompts using expect or perl

2005-07-08 Thread DBSMITH
ft UNIX Support [EMAIL PROTECTED]" 1024-bit DSA key, ID 30B6905A, created 2004-04-07 Enter passphrase: "password" I am thinking expect could accomplish this, but can perl? I tried using a HEREIS block and that did not work. thank you, derek Derek B. Smith OhioHealth IT UNIX

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

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.

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")

RE: RE: Capturing the results from Expect with backtick

2005-02-17 Thread Lal, Kumundani \(cognizant\)
- Original Message - From: Tyson Sommer <[EMAIL PROTECTED]> Date: Thursday, February 17, 2005 11:42 am Subject: RE: Capturing the results from Expect with backtick > > > > -Original Message- &g

Re: RE: Capturing the results from Expect with backtick

2005-02-17 Thread mgoland
- Original Message - From: Tyson Sommer <[EMAIL PROTECTED]> Date: Thursday, February 17, 2005 11:42 am Subject: RE: Capturing the results from Expect with backtick > > > > -Original Message- > > From: glidden, matthew [EMAIL PROTECTED] > > Sent:

RE: Capturing the results from Expect with backtick

2005-02-17 Thread Tyson Sommer
> -Original Message- > From: glidden, matthew [mailto:[EMAIL PROTECTED] > Sent: Thursday, February 17, 2005 10:15 AM > To: 'beginners@perl.org' > Subject: Capturing the results from Expect with backtick > > I'm using combined perl and Expect scripts

Capturing the results from Expect with backtick

2005-02-17 Thread glidden, matthew
I'm using combined perl and Expect scripts to do the following: 1. ping a host using expect (for technical reasons, I've had better luck using expect than perl here) 2. for each system that responds to ping, perform a series of rsh commands via perl The expect script is this, where $

Re: Perl versus Expect(tcl) : Specific Example

2005-02-13 Thread perl perl
Excellent info coming in, so far. If its true that we have to use two versions of Perl Expect.PM (ActiveState) and Perl Expect.PM (Unix)... then wouldn't that pose double script maintenance issues? My Expect(tcl) script is simplified and centralized to one file. Its capable of switching

Re: Perl versus Expect(tcl) : Specific Example

2005-02-13 Thread Scott Pham
Perl Expect on Windows CON: Expect perl module can't be used on a Windows platform. Looks like your best bet is to use activestate TCL if it's on windows. On Sat, 12 Feb 2005 17:27:54 -0800, perl perl <[EMAIL PROTECTED]> wrote: > Hi, I'd like to narrow the previous Expe

Re: Perl versus Expect(tcl) : Specific Example

2005-02-12 Thread Owen Cook
On Sat, 12 Feb 2005, perl perl wrote: > > Question2: :-) > How do you implement the Expect script above into Perll? Are there > several modules to choose from? Here is a little admin script I run from time to time which might explain the use of Perl's expect (Yes..I know, n

Perl versus Expect(tcl) : Specific Example

2005-02-12 Thread perl perl
Hi, I'd like to narrow the previous Expect(tcl) question so that an answer can be extracted: Perl vs Expect(tcl) question again. Here is a specific Expect example: I have a release engineering build script that performs the following: Launch masterbuild.tcl (expect script) from WinNT s

Re: Re: Perl versus EXPECT(tcl)

2005-02-12 Thread geringer2
Hi Xiaofang: Because expect waits response from unix (or linux) - it 'EXPECTS' a response, it won't work on xp. Expect is more like a tcl script than perl and I don't think there's a tcl script either for xp (or dos) - I may be wrong. Hope this helps a little. Ro

RE: Re: Perl versus EXPECT(tcl)

2005-02-12 Thread Gomez, Juan
ry 11, 2005 11:00 AM To: Perl Beginners List Subject: Re: Re: Perl versus EXPECT(tcl) Hi, Bob, Sounds the expert.pm is cool. But when I try to install the pre-required io::pty, I got a fatal error. Is it possible to install io::tty and expert on xp? --- cl -c -nolog

Re: Re: Perl versus EXPECT(tcl)

2005-02-12 Thread Bob Showalter
Xiaofang Zhou wrote: Hi, Bob, Sounds the expert.pm is cool. But when I try to install the pre-required io::pty, I got a fatal error. Is it possible to install io::tty and expert on xp? No. ptys are a Unix only thing. -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [E

Re: Re: Re: Perl versus EXPECT(tcl)

2005-02-11 Thread Xiaofang Zhou
t;-IE:\Perl\lib\ >CORE Tty.c >Tty.c >Tty.xs(94) : fatal error C1083: Cannot open include file: 'unistd.h': No such >fi >le or directory >NMAKE : fatal error U1077: 'cl' : return code '0x2' >Stop. >--- > > > >在 2005

Re: Perl versus EXPECT(tcl)

2005-02-11 Thread forknerr
Perl has modules you can include that allow you to use the power of perl and the functionality of Expect. - Original Message - From: A B C <[EMAIL PROTECTED]> Date: Friday, February 11, 2005 6:16 pm Subject: Perl versus EXPECT(tcl) > Greetings, > > I've heard

Re: Re: Perl versus EXPECT(tcl)

2005-02-11 Thread Xiaofang Zhou
rror U1077: 'cl' : return code '0x2' Stop. --- 在 2005-02-11 21:42:00 您写道: >Chris Devers wrote: >> Several programming languages have mechanisms for building wrappers >> around Expect, including Perl. In this case, you need a module li

Re: Perl versus EXPECT(tcl)

2005-02-11 Thread Bob Showalter
Chris Devers wrote: Several programming languages have mechanisms for building wrappers around Expect, including Perl. In this case, you need a module like Expect.pm or Expect::Simple, as described here: Pedantic point: Expect.pm is perhaps best thought of as an Expect "clone" or "

Re: Perl versus EXPECT(tcl)

2005-02-11 Thread Chris Devers
On Fri, 11 Feb 2005, A B C wrote: > I've heard that Expect(tcl) is outstanding in what it > specializes in. Can any experts in both Expect and > Perl Networking comment? > > I want to know if Perl's Networking arena is superior > or equal to what Expect specializ

Perl versus EXPECT(tcl)

2005-02-11 Thread A B C
Greetings, I've heard that Expect(tcl) is outstanding in what it specializes in. Can any experts in both Expect and Perl Networking comment? I want to know if Perl's Networking arena is superior or equal to what Expect specializes in.

Re: net::ssh & expect

2004-09-14 Thread Wiggins d Anconia
> On Tue, 14 Sep 2004 07:36:38 -0600, Wiggins d Anconia > <[EMAIL PROTECTED]> wrote: > > > I have a script that I use to ssh to a list of servers to run a few > > > commands. I'm trying to find a way su up & run a command - however I'm > > > in need of some inspiration as to how to pull this off. >

Re: net::ssh & expect

2004-09-14 Thread john smith
On Tue, 14 Sep 2004 07:36:38 -0600, Wiggins d Anconia <[EMAIL PROTECTED]> wrote: > > I have a script that I use to ssh to a list of servers to run a few > > commands. I'm trying to find a way su up & run a command - however I'm > > in need of some inspiration as to how to pull this off. > > > > Ha

Re: net::ssh & expect

2004-09-14 Thread Wiggins d Anconia
> I have a script that I use to ssh to a list of servers to run a few > commands. I'm trying to find a way su up & run a command - however I'm > in need of some inspiration as to how to pull this off. > Have you considered 'sudo' instead? It would make this task much easier, would eliminate the n

net::ssh & expect

2004-09-14 Thread john smith
I have a script that I use to ssh to a list of servers to run a few commands. I'm trying to find a way su up & run a command - however I'm in need of some inspiration as to how to pull this off. Heres the script template for reference:- #!/usr/bin/perl -w use strict; use Term::ReadKey; use Net:

Re: Perl <-> Expect

2004-07-25 Thread Ramprasad A Padmanabhan
::GUITest on to my xterm, but that is too much of a pain Thanks Ram On Thu, 2004-07-15 at 17:11, [EMAIL PROTECTED] wrote: > Hi, > > >I need to telnet some hosts automatically without supplying password. > >I can do it with Expect but I hardly know the language. > >I wonder wh

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

Expect prog. doesn't work in background !

2004-07-15 Thread Ravinder Arepally
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. Thanks #!/usr/local/bin/perl -w use File::Basename; our $debug; use Expect; @ARGV == 1 or die "usage: $0 rem

Re: Perl <-> Expect

2004-07-15 Thread William . Ampeh
There are lots of sample codes on the web (do a google search on "telnet program using expect). Here is one of the links http://www.elektro.com/~mlud/pettefar.de/docs/html/v08/i03/a3.htm Also here is a sample code I wrote for one of my codes I found lying around. You can clean it u

  1   2   >