home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #16 / NN_1992_16.iso / spool / comp / unix / question / 9601 < prev    next >
Encoding:
Text File  |  1992-07-30  |  909 b   |  28 lines

  1. Newsgroups: comp.unix.questions
  2. Path: sparky!uunet!cis.ohio-state.edu!magnus.acs.ohio-state.edu!usenet.ins.cwru.edu!odin!chet
  3. From: chet@odin.INS.CWRU.Edu (Chet Ramey)
  4. Subject: Re: Bourne shell question about $ expansion
  5. Message-ID: <1992Jul30.194622.16495@usenet.ins.cwru.edu>
  6. Sender: news@usenet.ins.cwru.edu
  7. Nntp-Posting-Host: odin.ins.cwru.edu
  8. Organization: Case Western Reserve University, Cleveland, OH (USA)
  9. References: <1992Jul30.170651.8939@cs.umb.edu>
  10. Distribution: usa
  11. Date: Thu, 30 Jul 92 19:46:22 GMT
  12. Lines:       15
  13.  
  14. $ Is it possible to $-expand a shell variable whose name is stored
  15. $ in another shell variable?  What I am looking for is the equivalent
  16. $ of
  17. $     xxx=bar
  18. $     bar=foo
  19. $     echo $($xxx)
  20.  
  21. eval echo \$$xxx
  22. -- 
  23. ``The use of history as therapy means the corruption of history as history.''
  24.     -- Arthur Schlesinger
  25.  
  26. Chet Ramey, Case Western Reserve University    Internet: chet@po.CWRU.Edu
  27.