[HPADM] TR: shell script question [SUMMARY]

From: HAUTECOEUR Bruno (HAUTECOB@ESSILOR.fr)
Date: Thu Aug 01 2002 - 04:39:12 EDT


hi all,

i received about 10 answers... thanks a lot every body.
What i needed is the following (given by almost every answers):

eval echo '$'${2}

Rgds,

________________
Bruno HAUTECOEUR
Architecte système Unix
DSI / Architecture Technique - Essilor International
Tel: 33 (0)1 48 98 73 20 / Fax: 33(0)1 49 56 20 56
mail: hautecob@essilor.fr

-----Message d'origine-----
De: HAUTECOEUR Bruno [mailto:HAUTECOB@ESSILOR.fr]
Date: mercredi 31 juillet 2002 17:37
À: 'hpadm'
Objet: [HPADM] shell script question

Hi admins,

 i'm looking for a way to do this:

i have a shell script to which i give 2 args strg1 and strg2.
Then, $1=strg1 and $2=strg2

Inside the script, i want strg2 to become the name of a variable and being
able to echo its value like: echo $strg2 ie $($2) ....

How can i do this ? (i hope my explanation is clear enough ...)

rgds,

________________
Bruno HAUTECOEUR
Architecte système Unix
DSI / Architecture Technique - Essilor International
Tel: 33 (0)1 48 98 73 20 / Fax: 33(0)1 49 56 20 56
mail: hautecob@essilor.fr

--
             ---> 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)
--
             ---> 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:17 EDT