ember 28, 2012 6:05 PM
Subject: Re: expect.pm not recognising match string
Hello Salva,
I tried many ways this is not happening. can you help? ( I did not try the
there is nothing printed in results. single word commands like ls pwd are also
not producing anything.
since CU sudo does not allow
sudo_path -k");
my @output = $ssh->capture({stdin_data => "$PASS"},
$sudo_path,
"-p",'', "$cmd");
print " result=@output \n";
____
From: Salvador
On 09/07/2012 12:54 AM, Rajeev Prasad wrote:
no because first i have to sudo to some other ID and then run commands.
You should be able to call every command through 'sudo', something like
this:
$ssh->capture('sudo', @sudo_opts, @cmd1);
$ssh->capture('sudo', @sudo_opts, @cmd2);
Ther
no because first i have to sudo to some other ID and then run commands.
From: David Precious
To: Rajeev Prasad
Cc: perl list
Sent: Thursday, September 6, 2012 4:57 AM
Subject: Re: expect.pm not recognising match string
On Wed, 5 Sep 2012 11:27:28
On Wed, 5 Sep 2012 11:27:28 -0700 (PDT)
Rajeev Prasad wrote:
> inside ssh tunnel (using Net::Openssh), a pty is opened.
>
> then an exp object is init to this pty my $exp=Expect->init($pty);
>
>
> using this object i am trying to run about quite a few commands on
> remote system. [...]
> I w
inside ssh tunnel (using Net::Openssh), a pty is opened.
then an exp object is init to this pty my $exp=Expect->init($pty);
using this object i am trying to run about quite a few commands on remote
system. I am using following method. It has two flaws: 1) does not work if
$exp->expect(5); li