<div dir="ltr"><div><div><div>Depends on how the other scripts look for the vars. If they are looking for command line args, then passing env vars won't work.<br><br></div>You can look for cli args first then env args as a fallback (or the other way around).<br>
<br></div>I prefer to explicitly pass args (um, actually depends on number of args) by either cli or file. It's faster to use env but for some reason I rarely use it.<br><br></div>Often I use name=value pairs for when I have many args to handle. <br>
</div><div class="gmail_extra"><br><br><div class="gmail_quote">On Fri, Oct 18, 2013 at 12:01 PM, leam hall <span dir="ltr"><<a href="mailto:leamhall@gmail.com" target="_blank">leamhall@gmail.com</a>></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><div><div><div><div><div><div><div><div><div>Hey all,<br><br></div>I have a master script that calls a couple hundred other scripts. Each of the "other" scripts can also be called in their own. <br>
<br></div>What I'm thinking about is having a variable like "test" or "fix" be set, so that if the "other" scripts run they will get a parameter without me having to put a getopts stanza in each script. <br>
<br></div>So maybe:<br><br></div>. ./my_vars<br></div><div>if [ $TEST ]<br></div><div>then<br>...<br></div><div><br></div>or <br><br></div>if [ -f ./TEST ]<br></div>then<br></div>...<br></div><br></div>Thoughts on the best way to do this? I'm not saying my ideas are the only way, just what comes to mind.<span class="HOEnZb"><font color="#888888"><br>
<br>Leam<br><br clear="all"><div><div><div><div><div><div><div><div><div><div><div>
<br>-- <br><div><a href="http://leamhall.blogspot.com/" target="_blank">Mind on a Mission</a></div>
</div></div></div></div></div></div></div></div></div></div></div></font></span></div>
<br>_______________________________________________<br>
Ale mailing list<br>
<a href="mailto:Ale@ale.org">Ale@ale.org</a><br>
<a href="http://mail.ale.org/mailman/listinfo/ale" target="_blank">http://mail.ale.org/mailman/listinfo/ale</a><br>
See JOBS, ANNOUNCE and SCHOOLS lists at<br>
<a href="http://mail.ale.org/mailman/listinfo" target="_blank">http://mail.ale.org/mailman/listinfo</a><br>
<br></blockquote></div><br><br clear="all"><br>-- <br><div dir="ltr">-- <br>James P. Kinney III<br><i><i><i><i><br></i></i></i></i>Every time you stop a school, you will have to build a jail. What you
gain at one end you lose at the other. It's like feeding a dog on his
own tail. It won't fatten the dog.<br>
- Speech 11/23/1900 Mark Twain<br><i><i><i><i><br><a href="http://heretothereideas.blogspot.com/" target="_blank">http://heretothereideas.blogspot.com/</a><br></i></i></i></i></div>
</div>