It is currently Mon, 04 Mar 2024 01:51:37 GMT

Author Message
 ENV Shell Variable to Normal Variable Qn
Hi All

Pls help this newbie

suppose I have an ENV variable ORA_LOGIN="userid/passwd"
through some process, i read in this variable $ORA_LOGIN into $NEW

I need to use $NEW like the below
sqlplus $NEW @sqlscript

But I guess you know it will show the string value "$ORA_LOGIN" instead of

is there a way I can make $NEW to show "userid/passwd" and not "$ORA_LOGIN"

many thanks in advance


 Wed, 17 Aug 2005 01:18:37 GMT   
 ENV Shell Variable to Normal Variable Qn

Actually, since you didn't tell us how you tried to assign
the value of ORA_LOGIN to NEW, we don't know what it will
show, or, more importantly for you, why it will show
anything. (You also didn't mention which shell - the syntax
can be quite different so knowing that is important.)

So, which shell and what have you tried so far? -Wm

 Wed, 17 Aug 2005 02:03:10 GMT   
 ENV Shell Variable to Normal Variable Qn
In article <b3o4g0$>,

Why?  That would only happen if you did something like:


because the quotes prevent variable expansion.

If you assign it as:


i.e. without the quotes, then it should work as you expect.

If you're doing something unlike what I've written, then you're going to
have to provide more details about "through some process", as the other
responder wrote.

Barry Margolin,
Genuity Managed Services, Woburn, MA
Please DON'T copy followups to me -- I'll assume it wasn't posted to the group.

 Wed, 17 Aug 2005 02:26:28 GMT   
   [ 3 post ] 

Similar Threads

1. file contents into shell/env variable

2. Setting env. variable within shell script

3. how to set env. variables in shell script

4. Executing a shell script to set env variables

5. Invoking Shell w/ Env. Variable

6. rsh and SHELL env variable

7. env variables between shells

8. Anyway to keep env variables across shells?

9. Setting ENV variables in C Shell

10. Changing Env. variable from shell

Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group.
Designed by ST Software