<div dir="ltr"><div>Depending on what your purpose for the this script is be aware that arrays are a fairly new GNU bash-ism, so if you use them your script may not be portable to other *sh shells that only do POSIX compliance. One relevant example is dash, which was (and I believe still is) the default invoked by &quot;sh&quot; on Ubuntu machines.<br>

<br></div>QH<br></div><div class="gmail_extra"><br><br><div class="gmail_quote">On Fri, Jun 21, 2013 at 3:26 PM, Mike Bean <span dir="ltr">&lt;<a href="mailto:beandaemon@gmail.com" target="_blank">beandaemon@gmail.com</a>&gt;</span> wrote:<br>

<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr"><div>Would export work in a script?   Huh...  Arrays make some intuitive sense.  Why is it these projects are never as simple as you think they&#39;re going to be when you start them?<br>

<br></div>Mike Bean<br>
</div><div class="gmail_extra"><br><br><div class="gmail_quote"><div><div class="h5">On Fri, Jun 21, 2013 at 3:09 PM, Raymond DeRoo <span dir="ltr">&lt;<a href="mailto:rderoo@deroo.net" target="_blank">rderoo@deroo.net</a>&gt;</span> wrote:<br>


</div></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div><div class="h5"><div style="word-wrap:break-word">Mike:<div><br></div><div>export is your friend.</div>

<div><br></div><div><div><div>
<div><blockquote type="cite"><div dir="ltr">OK, I am just thoroughly writer&#39;s blocked, probably missing something obvious; but who knows.  Anyway, here&#39;s my question<br><br># node=somenode<br># echo $node<br>somenode<br>


# somenodeVar=5  <i><b> // if this works</b></i><br>
# echo $somenodeVar<br>5<br># $node&quot;Var&quot;=5 <i><b>// why doesn&#39;t this work?</b></i><br>bash: somenodeVar=5: command not found<br></div></blockquote><br></div></div></div><div><div>[16:06:18 rderoo@daggoo ~]$ node=somenode</div>


<div>[16:07:03 rderoo@daggoo ~]$ echo $node</div><div>somenode</div><div>[16:07:49 rderoo@daggoo ~]$ export &quot;${node}Var&quot;=5</div><div>[16:07:57 rderoo@daggoo ~]$ echo $somenodeVar;</div><div>5</div><div><div>[16:07:58 rderoo@daggoo ~]$ echo $somenodeVar;</div>


</div><div><br></div></div><br></div><div>For the time being well skip the discussion on why variable variables are bad and that one should really be using arrays...</div><div><br></div><div>Kind Regards,</div><div>Raymond</div>


</div><br></div></div>_______________________________________________<br>
clue mailing list: <a href="mailto:clue@cluedenver.org" target="_blank">clue@cluedenver.org</a><br>
For information, account preferences, or to unsubscribe see:<br>
<a href="http://cluedenver.org/mailman/listinfo/clue" target="_blank">http://cluedenver.org/mailman/listinfo/clue</a><br></blockquote></div><br></div>
<br>_______________________________________________<br>
clue mailing list: <a href="mailto:clue@cluedenver.org">clue@cluedenver.org</a><br>
For information, account preferences, or to unsubscribe see:<br>
<a href="http://cluedenver.org/mailman/listinfo/clue" target="_blank">http://cluedenver.org/mailman/listinfo/clue</a><br></blockquote></div><br></div>