Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Mailing Lists -> Oracle-L -> RE: unix shell script question

RE: unix shell script question

From: Hitchman, Peter <peter.hitchman_at_derwent.co.uk>
Date: Tue, 15 Jul 2003 14:16:16 +0100
Message-Id: <25929.337794@fatcity.com>


Hi,
This works in ksh:

DBNAME=PROD
LINE_PROD=500
OTHER=\${LINE_${DBNAME}}
eval echo $OTHER

Regards

Pete

[END] -----Original Message-----
From: Dilip [mailto:dilip7772002_at_indiatimes.com] Sent: 15 July 2003 11:35
To: Multiple recipients of list ORACLE-L Subject: OT: unix shell script question

Hi List,

The requirement is as follows:

DBNAME=PROD ( 'DBNAME' variable contains value 'PROD' )

LINE_PROD=100 ( 'LINE_PROD' variable contains value 100 )

Now I want to echo the LINE_PROD variable using DBNAME variable. e.g
echo ${LINE_${DBNAME}} should return 100.

Is this possible and if yes, how ? I tried some ways but couldn't find any way.

Regards,
~Dilip

Get Your Private, Free E-mail from Indiatimes at http://email.indiatimes.com

 Buy The Best In BOOKS at http://www.bestsellers.indiatimes.com

Bid for for Air Tickets @ Re.1 on Air Sahara Flights. Just log on to http://airsahara.indiatimes.com and Bid Now !

--

Please see the official ORACLE-L FAQ: http://www.orafaq.net
--

Author: Dilip
  INET: dilip7772002_at_indiatimes.com

Fat City Network Services    -- 858-538-5051 http://www.fatcity.com
San Diego, California        -- Mailing list and web hosting services
---------------------------------------------------------------------
To REMOVE yourself from this mailing list, send an E-Mail message to: ListGuru_at_fatcity.com (note EXACT spelling of 'ListGuru') and in the message BODY, include a line containing: UNSUB ORACLE-L (or the name of mailing list you want to be removed from). You may also send the HELP command for other information (like subscribing).

This email has been scanned for all viruses by the MessageLabs Email Security System. For more information on a proactive email security service working around the clock, around the globe, visit http://www.messagelabs.com

The information contained in this email is confidential and intended only for the use of the individual or entity named above. 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. Thomson Scientific will accept no responsibility or liability in respect to this email other than to the addressee. If you have received this communication in error, please notify us immediately via email: ITHelpdesk_at_derwent.co.uk Received on Tue Jul 15 2003 - 08:16:16 CDT

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US