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

Phil Turmel philip at turmel.org
Fri Oct 18 15:56:46 EDT 2013


On 10/18/2013 01:03 PM, leam hall wrote:
> So far, that's what I'm thinking. The process would be:
> 
> master script zeros out the param file
> master script takes options given to it and writes to a param file
> For example:
> 
> params.sh
>   TEST=0  # Test for condition, default true
>   FAIL=1   #  Has not failed yet
>   FIX=1     #  Default  to do not fix
> 
> Called script looks something like:
> 
> . params.sh

There be dragons.

What happens if the master script crashes/fails to clean up and you run
one of the subordinate scripts?

What happens if you run multiple instances of the master script
simultaneously (unintentionally, perhaps)?

Environment variables and/or command line arguments are the safe ways to
do this.  Files are not.  (Pipes are ok too, but can be hard to use for
this case.)

Phil



More information about the Ale mailing list