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

  1. Newsgroups: comp.unix.shell
  2. Path: sparky!uunet!sun-barr!ames!pacbell.com!well!well.sf.ca.us!phanson
  3. From: phanson@well.sf.ca.us (Pete Hanson)
  4. Subject: Re: in Korn/Bourne how do you double substitute an env var???
  5. Message-ID: <phanson.714859047@well.sf.ca.us>
  6. Sender: news@well.sf.ca.us
  7. Reply-To: phanson@well.sf.ca.us
  8. Organization: The WELL
  9. References: <fish.714852962@news2.gsfc.nasa.gov>
  10. Date: Wed, 26 Aug 1992 19:57:27 GMT
  11. Lines: 17
  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.  
  23. Try      eval echo $"{${foo}fly}"
  24.  
  25. -- 
  26.                              =====================
  27.                                   Pete Hanson
  28.                              phanson@well.sf.ca.us
  29.                              =====================
  30.