|
From: | Matthew Woehlke |
Subject: | Re: Evaluating a variable within a variable |
Date: | Tue, 23 Oct 2007 12:01:18 -0500 |
User-agent: | Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.8.1.6) Gecko/20070728 Thunderbird/2.0.0.6 Mnenhy/0.7.5.0 |
Paul Jarc wrote:
TimtheEagle <tim.cheyne@safecom.co.nz> wrote:main_auth=7 f=main t=auth ile=$f"_"$t echo $ileEither: echo "${!ile}"
Not portable.
Or: eval "echo \"\$$ile\""
Portable (even to Solaris /bin/sh which is not POSIX). Not saying which you should use, just something to be aware of. -- Matthew There's no place like ~.
[Prev in Thread] | Current Thread | [Next in Thread] |