home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #16 / NN_1992_16.iso / spool / comp / unix / question / 9594 < prev    next >
Encoding:
Internet Message Format  |  1992-07-30  |  863 b 

  1. Path: sparky!uunet!zaphod.mps.ohio-state.edu!caen!destroyer!gumby!yale!hsdndev!news.cs.umb.edu!mzraly
  2. From: mzraly@ra.cs.umb.edu (Michael S. Zraly)
  3. Newsgroups: comp.unix.questions
  4. Subject: Bourne shell question about $ expansion
  5. Message-ID: <1992Jul30.170651.8939@cs.umb.edu>
  6. Date: 30 Jul 92 17:06:51 GMT
  7. Sender: news@cs.umb.edu (USENET News System)
  8. Distribution: usa
  9. Organization: University of Massachusetts at Boston
  10. Lines: 19
  11. Originator: mzraly@ra.cs.umb.edu
  12. Nntp-Posting-Host: ra.cs.umb.edu
  13.  
  14. Here's another question for y'all:
  15.  
  16. Is it possible to $-expand a shell variable whose name is stored
  17. in another shell variable?  What I am looking for is the equivalent
  18. of
  19.  
  20.     # thios does NOT work!
  21.     xxx=bar
  22.     bar=foo
  23.     echo $($xxx)
  24.  
  25. to produce
  26.  
  27.     foo
  28.  
  29. -- Mike
  30. -- 
  31. Mike Zraly        Do not meddle in the affairs of troff,
  32. mzraly@cs.umb.edu    for it is subtle and quick to anger.
  33.