RE: How to a value from sqlplus a shell variable

RE: How to a value from sqlplus a shell variable

 

  

SET HEADING OFF
SET FEEDBACK OFF
SET VERIFY OFF
DEFINE VARIABLE=&&VALUE
SPOOL /tmp/V.val
select '&VARIABLE' from dual;
SPOOL OFF
!cat /tmp/V.val

VARIABLE=`sed "s/^ //" /tmp/V.val`;echo "VARIABLE=$VARIABLE"

The blank after ^ is an ascii '0C' or np

-----Original Message-----
From: Michael
[mailto:oracledba-ezmlmshield-x15291323.[Email address protected]
Sent: Friday, May 28, 2004 1:09 PM
To: LazyDBA.com Discussion
Subject: How to a value from sqlplus a shell variable


Anyone knows how to pass a variable in sql plus to a shell variable.
Such that after disconnecting from the database you can still access
this variable in a Unix shell

Thanks in advance for your Help



--------
website: http://www.LazyDBA.com
Please don't reply to RTFM questions
Oracle documentation is here: http://tahiti.oracle.com
To unsubscribe: see http://www.lazydba.com/unsubscribe.html
To subscribe: send a blank email to oracledba-[Email address protected]
By using this list you agree to these
terms:http://www.lazydba.com/legal.html


**********************************************************************
The information contained in this communication is
confidential, is intended only for the use of the recipient
named above, and may be legally privileged.
If the reader of this message is not the intended
recipient, you are hereby notified that any dissemination,
distribution, or copying of this communication is strictly
prohibited.
If you have received this communication in error,
please re-send this communication to the sender and
delete the original message or any copy of it from your
computer system. Thank You.


Oracle LazyDBA home page