How safe is it to use export
in bash scripts when using GNU Parallel?
I have a parent script. parent.sh
(echo child.sh & echo child_two.sh) || parallel bash
wait
if [[ "$STATUS1" == "0" && "$STATUS2" == "0" ]];
then
//continue
else
//stop the process
fi
child.sh
Getting the STATUS1
based on another process
export STATUS1
child_two.sh
Getting the STATUS2 based on another process
export STATUS2
Is is safe to use export
and does the value of STATUS1
& STATUS2
get resrt eveytime it is being run?
parallel
in the code as there is no pipe, only a conditional.