LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 06-05-2013, 06:29 PM   #1
manickaraja
LQ Newbie
 
Registered: Sep 2003
Location: India
Posts: 26

Rep: Reputation: 0
Question on Shell Script


Hi,
I am having a shell script with similar content as shown below.

export ORACLE_HOME1=${data.GI_ORACLE_HOME_LOC}
export ORACLE_HOME2=${data.DB_ORACLE_HOME_LOC}
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.
 
Old 06-05-2013, 08:04 PM   #2
evo2
LQ Guru
 
Registered: Jan 2009
Location: Japan
Distribution: Mostly Debian and Scientific Linux
Posts: 5,753

Rep: Reputation: 1288Reputation: 1288Reputation: 1288Reputation: 1288Reputation: 1288Reputation: 1288Reputation: 1288Reputation: 1288Reputation: 1288
Hi,

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

Evo2.
 
Old 06-05-2013, 08:24 PM   #3
AnanthaP
Member
 
Registered: Jul 2004
Location: Chennai, India
Distribution: UBUNTU 5.10 since Jul-18,2006 on Intel 820 DC
Posts: 819

Rep: Reputation: 197Reputation: 197
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.

OK
 
1 members found this post helpful.
Old 06-05-2013, 08:34 PM   #4
evo2
LQ Guru
 
Registered: Jan 2009
Location: Japan
Distribution: Mostly Debian and Scientific Linux
Posts: 5,753

Rep: Reputation: 1288Reputation: 1288Reputation: 1288Reputation: 1288Reputation: 1288Reputation: 1288Reputation: 1288Reputation: 1288Reputation: 1288
Hi,
Quote:
Originally Posted by AnanthaP View Post
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...

Evo2.
 
Old 06-06-2013, 02:30 PM   #5
David the H.
Bash Guru
 
Registered: Jun 2004
Location: Osaka, Japan
Distribution: Debian sid + kde 3.5 & 4.4
Posts: 6,823

Rep: Reputation: 1958Reputation: 1958Reputation: 1958Reputation: 1958Reputation: 1958Reputation: 1958Reputation: 1958Reputation: 1958Reputation: 1958Reputation: 1958Reputation: 1958
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.
 
Old 06-06-2013, 05:31 PM   #6
manickaraja
LQ Newbie
 
Registered: Sep 2003
Location: India
Posts: 26

Original Poster
Rep: Reputation: 0
Hi,
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.

Regards,
Manick.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
question in shell script abood1190 Programming 14 08-31-2011 07:52 PM
[SOLVED] Script question: Shell script in kde to log in on a server with ssh c4719929 Programming 18 01-31-2011 09:26 AM
[SOLVED] Script question: create a shell script in kde to log in on a server with ssh c4719929 Linux - Newbie 1 01-31-2011 03:05 AM
shell script question rrwhite Linux - General 3 09-15-2004 01:01 AM
Shell script question. siaful Linux - Newbie 1 04-29-2004 05:01 PM


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

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration