Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> c.d.o.misc -> Re: Staying in svrmgrl through a script.

Re: Staying in svrmgrl through a script.

From: Tom Zamani <tom_at_taten.com.au>
Date: Thu, 23 Sep 1999 14:49:06 +1000
Message-ID: <7scbfd$2qm$1@perki.connect.com.au>


try this:

#!/bin/sh
svrmgrl <<EOF
connect internal
startup
EOF -Nick

Richard Chen wrote in message <37E97D0F.9C15D31A_at_torus.eng.yale.edu>...
>This is what the program "expect" is designed for.
>The following 4-line script will do what you want.
>
>oracle$ cat ./tmp.exp
>#!/usr/bin/expect
>spawn svrmgrl
>expect "SVRMGR> " {send "connect internal\r"}
>interact
>
>Get expect from
>ftp://ftp.cme.nist.gov/pub/expect
>
>HTH
>
>Richard Chen
>
>Kenneth C Stahl wrote:
>>
>> I don't know if this is exactly what you are looking for, but try a
script
>> like this while logged in as oracle:
>>
>> #!/bin/ksh
>> svrmgrl command="connect internal"
>> exit 0;
>>
>> However, the shell script will not exit until after you exit from
svrmgrl,
>> so that may not be what you want.
>>
>> Tom wrote:
>> >
>> > One of my colleagues has asked me if it is possible to write a script
from
>> > unix to start svrmgrl session and connect internal without exiting
after
>> > the script ends. I can't seeem to stop the program from exiting and
>> > disconnecting from svrmgrl a soon as the script ends. I would like to
stay
>> > at the svrmgrl prompt. Is this possible?
>> >
>> > Thanks in advance,
>> > Tom
Received on Wed Sep 22 1999 - 23:49:06 CDT

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US