home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #19 / NN_1992_19.iso / spool / comp / unix / shell / 3664 < prev    next >
Encoding:
Text File  |  1992-08-27  |  732 b   |  27 lines

  1. Newsgroups: comp.unix.shell
  2. Path: sparky!uunet!ftpbox!mothost!merlin.dev.cdx.mot.com!fendahl.dev.cdx.mot.com!mcook
  3. From: mcook@fendahl.dev.cdx.mot.com (Michael Cook)
  4. Subject: Re: in Korn/Bourne how do you double substitute an env var???
  5. Message-ID: <mcook.714928367@fendahl.dev.cdx.mot.com>
  6. Sender: news@merlin.dev.cdx.mot.com (USENET News System)
  7. Nntp-Posting-Host: fendahl.dev.cdx.mot.com
  8. Organization: Motorola Codex, Canton, Massachusetts
  9. References: <fish.714852962@news2.gsfc.nasa.gov>
  10. Date: Thu, 27 Aug 1992 15:12:47 GMT
  11. Lines: 14
  12.  
  13. fish@daacdev1.stx.com writes:
  14.  
  15. >if i had:
  16. >foo=bar
  17. >barfly=fish
  18. >echo ${${foo}fly}    # i want fish as the output but my syntax is bad here
  19.  
  20. >help
  21.  
  22. Use "eval".
  23.  
  24.  eval echo \${${foo}fly}
  25.  
  26. Michael.
  27.