[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[ale] How to pass vars to lots of shell scripts?



Could this be done by setting an environment variable then test for the
value in your script and branch to do whatever.

--chip


On Fri, Oct 18, 2013 at 12:01 PM, leam hall <leamhall at gmail.com> wrote:

> Hey all,
>
> I have a master script that calls a couple hundred other scripts. Each of
> the "other" scripts can also be called in their own.
>
> 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.
>
> So maybe:
>
> . ./my_vars
> if [ $TEST ]
> then
> ...
>
> or
>
> if [ -f ./TEST ]
> then
> ...
>
> Thoughts on the best way to do this? I'm not saying my ideas are the only
> way, just what comes to mind.
>
> Leam
>
>
> --
> Mind on a Mission <http://leamhall.blogspot.com/>
>
> _______________________________________________
> Ale mailing list
> Ale at ale.org
> http://mail.ale.org/mailman/listinfo/ale
> See JOBS, ANNOUNCE and SCHOOLS lists at
> http://mail.ale.org/mailman/listinfo
>
>


-- 
Just my $.02, your mileage may vary,  batteries not included, etc....
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.ale.org/pipermail/ale/attachments/20131018/3a5181be/attachment.html>