-   Linux - Newbie (
-   -   Question on Shell Script (

manickaraja 06-05-2013 07:29 PM

Question on Shell Script
I am having a shell script with similar content as shown below.

export USERNAME=${data.EMUserName}

Now I want to know what are other variables that are available as part of "data" data set and display all. Can some one show me the way on how to do the same? Thanks a lot for your time and help in this regard.

evo2 06-05-2013 09:04 PM


the "env" command will list all currently defined shell/environment variables (for bourne style shells).


AnanthaP 06-05-2013 09:24 PM

Reading carefully, this is an Oracle question.

You can also look at an Oracle forum.

I think that it is "set" within the oracle prompt.


evo2 06-05-2013 09:34 PM


Originally Posted by AnanthaP (Post 4966234)
I think that it is "set" within the oracle prompt.

Good catch: shell variables can't contain ".". However, the OP explicitly says it is a shell script...


David the H. 06-06-2013 03:30 PM

I'm assuming you want to use the value in the shell variables as parameters for a database enquiry? Well then, what's the command you want to use for doing it with a single entry?

Configure that, then wrap a loop around it and substitute the variables you want to use as the inputs.

However, you'll probably want to use an array for the shell script instead of single variables. Perhaps even an associative array.

manickaraja 06-06-2013 06:31 PM

Thanks for all your responses. I found the answer and my question was mis-leading I suppose. Actually it was Java procedure which has the variable value assigned and within java procedure shell script is called and hence variables are passsed internally. Any ways thanks for your time & response.


All times are GMT -5. The time now is 12:12 AM.