Article View: comp.unix.shell
Article #1754Evaluating a nexted variable
From: Doug McNeil
Date: Sat, 10 Nov 1990 18:44
Date: Sat, 10 Nov 1990 18:44
23 lines
907 bytes
907 bytes
Hello, A friend needed to get the value of a variable which was contained in a variable: $a=b $c=a Determing the value of "a" given "c". I came up with: $eval z="$`echo $c`" $echo $z Not being a shell guru, I expect there are lots of better ways to do this. Any comments? -- -----------------------------------------------------------------------------> "Smokin" Doug McNeil | ...!uunet!mitel!spock!mcneild Mitel Corporation, Kanata, Ontario | (613)592-2122 "I know a lot of fancy dancers.." - Cat Stevens |
Technical Details
Message-ID:
<MCNEILD.90Nov10134417@mcneild.Software.Mitel.COM>Path:
arc1-ca.pugleaf.net!utzoo!utgpu!cunews!spock!mcneild!mcneildShow Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!utzoo!utgpu!cunews!spock!mcneild!mcneild From: mcneild@mcneild.Software.Mitel.COM (Doug McNeil) Newsgroups: comp.unix.shell Subject: Evaluating a nexted variable Message-ID: <MCNEILD.90Nov10134417@mcneild.Software.Mitel.COM> Date: 10 Nov 90 18:44:17 GMT Sender: mcneild@spock Distribution: na Organization: /home/hci/mcneild/.organization Lines: 23