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
tried using Net::SSH2 and Net::SSH::Perl and it didn't work for me so i had to use expect. Thanks On Tue, Jan 5, 2010 at 8:30 PM, Salvador Fandino wrote: > perl_haxor 123 wrote: > >> Hi All, >> >> I'm new to perl and facing a problem.... I'm

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
rl script executes commands on that servers 4.- Expect do his part of the job with the outputs of the commands executed. So, you can share your public ssh key in each target server to log in directly with the valid ssh account without a password (and save yourself about the first part of the perl/ex

Re: perl expect script to login to multiple machines

2010-01-03 Thread Jeremiah Foster
On Jan 4, 2010, at 24:15, Alvaro Mantilla Gimenez wrote: > Hello, > > I know this is a Perl question but is not more easier to log in with > ssh public key method and execute the commands inside the foreach and > don't do all the username/password code? Sometimes - like when you have a cluster

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

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: Perl Expect help

2008-05-06 Thread Juan Pablo Feria Gomez
outp = split /\n/, $rootexpect->exp_before(); $actualprompt= "$outp[$#outp]"."$match"; print "got $actualprompt\n"; On Fri, May 2, 2008 at 10:33 AM, Ravi Malghan <[EMAIL PROTECTED]> wrote: > Hi: I am trying to build a simple perl/expect

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

Re: Perl <-> Expect

2004-07-25 Thread Ramprasad A Padmanabhan
I dont think the ssh option is always available to everyone. Most times these hosts are non linux machines, so they dont come with ssh servers by default. Now If you dont have root access , you cant install ssh servers. But good old telnet is always available. ( I am not bothered about someon

Re: Perl <-> Expect

2004-07-15 Thread William . Ampeh
er information\n\n"; exit 1 } timeout { puts "\n\nWarning: Timed out: Last BLOCK\n\n"; exit 6 } } #... exit 1 __ William Ampeh (x3939) Federal Reserve Board

RE: Perl <-> Expect

2004-07-15 Thread NYIMI Jose (BMB)
> -Original Message- > From: Ohad Ohad [mailto:[EMAIL PROTECTED] > Sent: Thursday, July 15, 2004 1:36 PM > To: [EMAIL PROTECTED] > Subject: Perl <-> Expect > > > Hi, > > I need to telnet some hosts automatically without supplying password. > >

RE: Perl <-> Expect

2004-07-15 Thread West, William M
} you can't do much to manipulate the expect script here, but it lets you grab the results. If you want a Perlish way to login outomatically, look at the Perl expect module (i haven't - and i understand it's a bit complicated) or look at Net::Telnet. I recommend t

Re: Perl <-> Expect

2004-07-15 Thread Ohad Ohad
ssh is not an option - I must use telnet From: [EMAIL PROTECTED] To: "Ohad Ohad" <[EMAIL PROTECTED]> CC: [EMAIL PROTECTED] Subject: Re: Perl <-> Expect Date: Thu, 15 Jul 2004 07:41:20 -0400 Hi, >I need to telnet some hosts automatically without supplying password. >I

Re: Perl <-> Expect

2004-07-15 Thread jeffrey_n_Dyke
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 what you think of the Perl module Expect - if it's any good and >easy to use. >Also if you can think of another way to do the job this will also be great.

Perl <-> Expect

2004-07-15 Thread Ohad Ohad
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 what you think of the Perl module Expect - if it's any good and easy to use. Also if you can think of another way to do the job this will also be great. Thank

Re: perl expect

2003-06-24 Thread Wiggins d'Anconia
Jose Malacara wrote: I have put together a script using the Perl Expect module to log into multiple hosts and execute a list of commands. I would like to be able to capture the output from each host and pattern match against it. The script (login and and issue commands) works fine, but I need some

perl expect

2003-06-20 Thread Jose Malacara
I have put together a script using the Perl Expect module to log into multiple hosts and execute a list of commands. I would like to be able to capture the output from each host and pattern match against it. The script (login and and issue commands) works fine, but I need some help on the