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/
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
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
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
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
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
; 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
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
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
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
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
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
Try installing manually IO::Pty before...
--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
http://learn.perl.org/
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
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
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
> "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
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")
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
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
> -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.
>
>
}
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
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
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.
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
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
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
27 matches
Mail list logo