<!doctype html public "-//w3c//dtd html 4.0 transitional//en">
<html>
My problem is not the logic control, but rather if
<br> the environmental variable MOM_CHAIR is set to "pine"
<br> var1 = MOM
<br>how can I put $var1 together with "_CHAIR" and the use it get the value
"pine"?
<br>I keep getting "MOM_CHAIR"
<p>merlin wrote:
<blockquote TYPE=CITE>On Fri, 23 Mar 2001, Fred James wrote:
<p>> This is Bourne shell scripting.
<br>>
<br>> Given similar environment variables such as
<br>> MOM_CHAIR
<br>> POP_CHAIR
<br>> KID_CHAIR
<br>> I want to build the variable name on the fly and retrieve the value
to
<br>> base a decision on in my script.
<br>> Hints?
<br>>
<br>>
<br>> --
<br>> Consider Fractals
<br>> a large, calm, black cat
<br>> who seems often to be my spiritual leader.
<p>Case statement? I'm not sure if bsh has an eval type function.
But, you
<br>could just case/esac it.
<p>--
<br>Merlin
<p>Without question, the greatest invention in the history of mankind is
<br>beer. Oh, I grant you that the wheel was also a fine invention, but
<br>the wheel does not go nearly as well with pizza.
<br>
--Dave Barry
<p>_______________________________________________
<br><a href="http://ntlug.org/mailman/listinfo/discuss">http://ntlug.org/mailman/listinfo/discuss</a></blockquote>
<pre>--
Consider Fractals
a large, calm, black cat
who seems often to be my spiritual leader.</pre>
</html>