You mean something like this:

$exp->expect(15, '-re', qr/((Password\:)|(Password\:\ ))/i)) ? (print "Entering 
Password\n") : (die "[$host3] - ERR: Error with sending password for 
($user1)\n");

The above snippet is for Expect.

Premson.



--- On Sun, 11/10/09, santosh kumar <[email protected]> wrote:

From: santosh kumar <[email protected]>
Subject: Re: [TwinCLinG] [perl ] How to capture the command prompt.
To: [email protected]
Date: Sunday, 11 October, 2009, 9:43 AM

Bharathi,

i actually want to capture the line "password" , i dont want to send any
password.
My requirement is not to send any password , i have to say that whole line
in one variable of short.

I tried expect.pm but it doesn't help my cause. Any other suggestions ?

Thanks,
Santosh

On Sat, Oct 10, 2009 at 11:22 PM, Bharathi Subramanian <
[email protected]> wrote:

>
>
> > The command is prompting for password , I want to capture "password"
> > line. Is there any regular expression or way to do it.
>
> If you are looking for Expect like tool, search for "expect.pm"
>
> Bye :)
> --
> Bharathi S




      Yahoo! India has a new look. Take a sneak peek http://in.yahoo.com/trynew

[Non-text portions of this message have been removed]

Reply via email to