RE: Telnet exits after time out

2007-07-27 Thread Lakshmi Sailaja
7/07, Lakshmi Sailaja <[EMAIL PROTECTED]> wrote: snip > What is the solution? Is there a way that I don't specify the time out value > and let it run until the exe completes its execution? snip You should never disable the timeout. If you do then there is a chance your program wi

Telnet exits after time out

2007-07-27 Thread Lakshmi Sailaja
Hi, I am logging to a remote session using telnet. I am calling a command to run an exe. This exe sometimes runs fast and at times take a couple of minutes depending on the objects. The problem that I am facing is: While creating the telnet object, I specify the time out. If the exe that am runni

RE: su and password in a Perl script

2007-07-09 Thread Lakshmi Sailaja
On 7/6/07, Lakshmi Sailaja <[EMAIL PROTECTED]> wrote: > my $pid = open3($wr, $rd, $er, 'sudo -S su - username'); No, you're still using su for what sudo is doing. You want to use sudo's -u option to specify the username, maybe like this: my $pid = open3($w

RE: su and password in a Perl script

2007-07-06 Thread Lakshmi Sailaja
Perl script On 7/5/07, Lakshmi Sailaja <[EMAIL PROTECTED]> wrote: > I want to automate the following through Perl: > su - user > and provide password > check if the login is successful or not. You'll probably have an easier time using sudo, instead of su; it's made

su and password in a Perl script

2007-07-05 Thread Lakshmi Sailaja
Hi, I will have to login as a super user and run some commands. I want to automate the following through Perl: su - user and provide password check if the login is successful or not. Can you please let me know? Thanks & Regards, Lakshmi 952-833-1220 -- To unsubscribe, e-mail: [EMAIL PROTECTED

RE: Prompt in Net::Telnet

2007-06-13 Thread Lakshmi Sailaja
iginal Message- From: Chas Owens [mailto:[EMAIL PROTECTED] Sent: Wednesday, June 13, 2007 12:35 PM To: [EMAIL PROTECTED] Cc: beginners@perl.org Subject: Re: Prompt in Net::Telnet On 6/13/07, Lakshmi Sailaja <[EMAIL PROTECTED]> wrote: > You are right that I am trying to connect to a Win

RE: Prompt in Net::Telnet

2007-06-13 Thread Lakshmi Sailaja
good. Please suggest!!! Thanks in Advance. Regards, Lakshmi 952-833-1220 -Original Message- From: Chas Owens [mailto:[EMAIL PROTECTED] Sent: Tuesday, June 12, 2007 6:41 PM To: [EMAIL PROTECTED] Cc: beginners@perl.org Subject: Re: Prompt in Net::Telnet On 6/12/07, Lakshmi Sailaja <[

Prompt in Net::Telnet

2007-06-12 Thread Lakshmi Sailaja
Hello, I am supposed to write a program that will telnet to a remote server and execute some commands. I get the following error: "timed-out waiting for command prompt at line " This is because the prompt is not set correctly. Can you please tell me what the prompt value should be set to? how c

RE: Net::Telnet - Variable in Prompt

2007-06-12 Thread Lakshmi Sailaja
essage- From: Chas Owens [mailto:[EMAIL PROTECTED] Sent: Tuesday, June 12, 2007 3:29 PM To: [EMAIL PROTECTED] Cc: Martin Barth; beginners@perl.org Subject: Re: Net::Telnet - Variable in Prompt On 6/12/07, Lakshmi Sailaja <[EMAIL PROTECTED]> wrote: > But it did not work. I was getting the b

RE: Net::Telnet - Variable in Prompt

2007-06-12 Thread Lakshmi Sailaja
org Cc: [EMAIL PROTECTED] Subject: Re: Net::Telnet - Variable in Prompt On Tue, 12 Jun 2007 11:56:12 -0500 "Lakshmi Sailaja" <[EMAIL PROTECTED]> wrote: > Hi, > > Is there a way to use a variable in the Prompt parameter like the below > line? > >

Net::Telnet - Variable in Prompt

2007-06-12 Thread Lakshmi Sailaja
Hi, Is there a way to use a variable in the Prompt parameter like the below line? my $telnet = Net::Telnet->new([HOST => "$server",] [PROMPT => /$prompt/,]); Thanks & Regards, Lakshmi 952-833-1220 -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [

RE: Run a block of sql commands using 'here document'

2007-06-08 Thread Lakshmi Sailaja
Cool...This worked!!! Thanks a zillion for the response!! Thanks & Regards, Lakshmi 952-833-1220 -Original Message- From: Adriano Ferreira [mailto:[EMAIL PROTECTED] Sent: Friday, June 08, 2007 11:56 AM To: beginners@perl.org Subject: Re: Run a block of sql commands using 'here document'

Run a block of sql commands using 'here document'

2007-06-08 Thread Lakshmi Sailaja
Hi, I know that using 'Here Documents', we can output multiple lines. But is it possible to run a couple of commands? $s = qx [sqlplus user/[EMAIL PROTECTED]

RE: ksh in a perl program

2006-06-06 Thread Lakshmi Sailaja
riano Ferreira [mailto:[EMAIL PROTECTED] Sent: Tuesday, June 06, 2006 2:14 PM To: [EMAIL PROTECTED]; beginners@perl.org Subject: Re: ksh in a perl program On 6/6/06, Lakshmi Sailaja <[EMAIL PROTECTED]> wrote: > Can I include a korn shell script in a perl program? Not include, but you certai

ksh in a perl program

2006-06-06 Thread Lakshmi Sailaja
Hello, Can I include a korn shell script in a perl program? I have done the following but I get a compilation failed error. abc is the ksh script. - require "/home/xxx/yyy/abc"; Error: syntax error at /home/xxx/yyy/abc line 3, near "." Compilat