Re: Evaluating a variable within a variable

2007-10-23 Thread Matthew Woehlke
Paul Jarc wrote: TimtheEagle <[EMAIL PROTECTED]> wrote: main_auth=7 f=main t=auth ile=$f"_"$t echo $ile Either: 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 awa

Re: Evaluating a variable within a variable

2007-10-23 Thread Paul Jarc
TimtheEagle <[EMAIL PROTECTED]> wrote: > main_auth=7 > > f=main > t=auth > > ile=$f"_"$t > > echo $ile Either: echo "${!ile}" Or: eval "echo \"\$$ile\"" paul

Evaluating a variable within a variable

2007-10-23 Thread TimtheEagle
be 7. The main_auth=7 will be read from a separate file in due course. I hope that is clear enough. Any help greatly appreciated. Thanks Cheers Tim -- View this message in context: http://www.nabble.com/Evaluating-a-variable-within-a-variable-tf4674649.html#a13355804 Sent from the Gnu - Ba