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/
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
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
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
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
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
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
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
_
> *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
, 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
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
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
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 => '
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.
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
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
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()
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
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:
>
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
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
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:
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 => "
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 =
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
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
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
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/
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
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
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
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 ("
; 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
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
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
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
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
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
>
> 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
>
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
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
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
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
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";
>
> > $
;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
> 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/")
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
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,
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
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 @
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 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
> 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
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?
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?
.
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
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
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
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
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
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`
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
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
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>
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
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
>>>>> "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.
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")
- 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
- 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:
> -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
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 $
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
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
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
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
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
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
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
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
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
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
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
"
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
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.
> 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.
>
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
> 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
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:
::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
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/
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.
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
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
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 - 100 of 146 matches
Mail list logo