Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Mailing Lists -> Oracle-L -> RE: OT Unix shell variable question
Gene,
Yep, I noticed the env vars are different in the text below (due to fat fingers). They are the same in the script. For whatever reason, HPUX (or oracle) doesn't like the variable $PASSWORD as a password. I worked around it by splitting the task up into a:
svrmgrl << EOF "here doc"
and a seperate:
sqlplus user/$PASSWORD << FOE "here doc" immediately following. (this works fine - go figure).
Scott Shafer
San Antonio, TX
210-581-6217
"And no amount of training or preparedness can eliminate the almost certainty that in the middle of your Angry Crane stance, as you transition to your Combative Monkey to administer the Coup de Grāce via your Ninja Death Touch, you step on a beer bottle and fall backwards into the juke box and get your head stove in by a drunk with a pool cue." --Jay Trigg
> -----Original Message-----
> From: Gene Sais [SMTP:Gsais_at_co.palm-beach.fl.us]
> Sent: Tuesday, May 29, 2001 2:20 PM
> To: Scott.Shafer_at_dcpds.cpms.osd.mil; ORACLE-L_at_fatcity.com
> Subject: Re: OT Unix shell variable question
>
> Scott - I have used it w/out problems, sample below:
>
> <snip ksh script>
>
> PFILE=$ORACLE_HOME/dbs/initorsp.ora
>
> svrmgrl <<EOF
> connect internal
> startup nomount pfile=$PFILE
> EOF
>
> </snip ksh script>
>
> PS. You have noticed your env. variables are different, right?
>
>
> >>> Scott.Shafer_at_dcpds.cpms.osd.mil 05/29/01 03:41PM >>>
> I am trying to pass a shell variable into a "here document" in a unix
> shell
> script, i.e.,
>
> export PASSWORD=the_pass
>
> svrmgrl << EOF
> connect user/$PASS
> do_stuff_here;
> commit;
> exit
> EOF
>
> I have tried: "$PASS" , \$PASS , and just plain $PASS - no dice.
> Anyone know how to do this? I spent too many hours in the sun this past
> weekend and am drawing a blank...
>
> Thanks,
>
> Scott Shafer
> San Antonio, TX
> 210-581-6217
>
> "And no amount of training or preparedness can eliminate the almost
> certainty that in the middle of your Angry Crane stance, as you transition
> to your Combative Monkey to administer the Coup de Grāce via your Ninja
> Death Touch, you step on a beer bottle and fall backwards into the juke
> box
> and get your head stove in by a drunk with a pool cue." --Jay Trigg
>
> --
> Please see the official ORACLE-L FAQ: http://www.orafaq.com
> --
> Author:
> INET: Scott.Shafer_at_dcpds.cpms.osd.mil
>
> Fat City Network Services -- (858) 538-5051 FAX: (858) 538-5051
> San Diego, California -- Public Internet access / Mailing Lists
> --------------------------------------------------------------------
> To REMOVE yourself from this mailing list, send an E-Mail message
> to: ListGuru_at_fatcity.com (note EXACT spelling of 'ListGuru') and in
> the message BODY, include a line containing: UNSUB ORACLE-L
> (or the name of mailing list you want to be removed from). You may
> also send the HELP command for other information (like subscribing).
-- Please see the official ORACLE-L FAQ: http://www.orafaq.com -- Author: INET: Scott.Shafer_at_dcpds.cpms.osd.mil Fat City Network Services -- (858) 538-5051 FAX: (858) 538-5051 San Diego, California -- Public Internet access / Mailing Lists -------------------------------------------------------------------- To REMOVE yourself from this mailing list, send an E-Mail message to: ListGuru_at_fatcity.com (note EXACT spelling of 'ListGuru') and in the message BODY, include a line containing: UNSUB ORACLE-L (or the name of mailing list you want to be removed from). You may also send the HELP command for other information (like subscribing).Received on Tue May 29 2001 - 14:30:12 CDT