[HPADM] Compound variable

From: Mahajan Sachin (Sachin.Mahajan@o2.com)
Date: Fri Nov 08 2002 - 07:13:50 EST


Hi Admins,

I am trying to write a script with compounded variables....ie my variable
name is also a variabl...but it does'nt seem to work.
Could someone point out the mistake or give me an alternative way of doing
it ?

for i in Appln
do

        echo
        echo
        echo "Please enter the directory where you want $i to be installed"
        read "$i"
        echo $($i)
        echo $Appln

done

echo $Appln gives me the right input variable
whereas echo $($i) does'nt !!!

This is perplexing....

Thanks in advance...
Sachin.

=========================================================
This electronic message contains information from the mmO2 plc Group
which may be privileged or confidential. The information is intended to be
for the use of the individual(s) or entity named above. If you are not the
intended recipient be aware that any disclosure, copying, distribution or
use of the contents of this information is prohibited. If you have received
this electronic message in error, please notify us by telephone or email
(to the numbers or address above) immediately.
=========================================================

--
             ---> Please post QUESTIONS and SUMMARIES only!! <---
        To subscribe/unsubscribe to this list, contact majordomo@dutchworks.nl
       Name: hpux-admin@dutchworks.nl     Owner: owner-hpux-admin@dutchworks.nl
 
 Archives:  ftp.dutchworks.nl:/pub/digests/hpux-admin       (FTP, browse only)
            http://www.dutchworks.nl/htbin/hpsysadmin   (Web, browse & search)


This archive was generated by hypermail 2.1.7 : Sat Apr 12 2008 - 11:02:21 EDT