<div dir="ltr">Another option is to use an include file to define variables for multiple scripts. <div><br></div><div><font face="'courier new', monospace">include.sh</font></div><div><font face="'courier new', monospace"><br>
</font></div><blockquote style="margin-top:0px;margin-right:0px;margin-bottom:0px;margin-left:40px;border-top-style:none;border-right-style:none;border-bottom-style:none;border-left-style:none;border-width:initial;border-color:initial;padding-top:0px;padding-right:0px;padding-bottom:0px;padding-left:0px">
<div><font face="'courier new', monospace">#!/bin/bash</font></div><div><font face="'courier new', monospace">X=xray</font></div><div><font face="'courier new', monospace">Y=yellow</font></div><div>
<font face="'courier new', monospace">Z=zulu</font></div></blockquote><div><div class="gmail_extra"><font face="'courier new', monospace"><br></font></div><div class="gmail_extra"><font face="'courier new', monospace">foobar.sh</font></div>
<div class="gmail_extra"><font face="'courier new', monospace"><br></font></div></div><blockquote style="margin:0 0 0 40px;border:none;padding:0px"><div><div><font face="'courier new', monospace">#!/bin/bash</font></div>
</div><div><div class="gmail_extra"><font face="'courier new', monospace">source include.sh</font></div></div><div><div class="gmail_extra"><font face="'courier new', monospace">echo "$X, $Y, $Z"</font></div>
</div></blockquote><div><div class="gmail_extra"><br></div><div class="gmail_extra"><br></div><div class="gmail_extra"><br><br><div class="gmail_quote">On Fri, Oct 18, 2013 at 2:23 PM, Scott Plante <span dir="ltr"><<a href="mailto:splante@insightsys.com" target="_blank">splante@insightsys.com</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin-top:0px;margin-right:0px;margin-bottom:0px;margin-left:0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex"><div><div style="font-size:12pt;font-family:arial,helvetica,sans-serif">
If I understand what you're asking, this is what the export keyword is for.<div><br></div><div>----------x.sh-------------</div><div>X=test</div><div>y.sh</div><div>export X</div><div>y.sh</div><div>-----------y.sh----------</div>
<div>echo X=$X</div><div>------------------------</div><div>$ ./x.sh</div><div>X=</div><div>X=test</div></div></div></blockquote></div></div></div></div>