Re: initialising env var using sqlplus
From: Bjorn Engsig <bengsig_at_dk.oracle.com>
Date: Mon, 19 Sep 1994 10:52:59 GMT
Message-ID: <CwDI8B.346_at_nl.oracle.com>
Date: Mon, 19 Sep 1994 10:52:59 GMT
Message-ID: <CwDI8B.346_at_nl.oracle.com>
In article <355cor$n1c_at_nuscc.nus.sg>, med10054_at_nusunix2.nus.sg
| (NORHISHAM BIN MAIN) writes:
|I'm trying to initialise a list of unix env variables using
|values retrieved from sqlplus but has not had much success.
|
| .....
|
|for EACH_DIR in $OUT_DIR; do
| $EACH_DIR=`echo "set feedback off
| set heading off ....
This really isn't an Oracle question, but never mind. The solution is
to use the shell's builtin eval function:
eval $EACH_DIR=`echo .......`
The eval function means that the shell will evaluate the rest of the command line after substitution of the parameter and the back-quotes.
Rgds, Bjorn.
-- Disclaimer: Although I work for ORACLE, I am sending this only in my technical interest to help others on The Net. All opinions are my own. -- Bjorn Engsig, ORACLE Corporation Internet: bengsig_at_oracle.com, uucp: uunet!oracle!bengsigReceived on Mon Sep 19 1994 - 12:52:59 CEST