Passing variables between sub-scripts

I have written a program for some data analysis. It is gettin long. I would like to restructure it so that i can have a master file which controls multiple subscripts in order to make it easier to understand.
I need to be able to define variables in the master script which are used by all three subscripts.
How do I pass common variables between all these scripts?

My a simplified master file would look like:
./Process_Input_Files
./Create_Input_Deck
./Format_Input_Deck

I think that is why we have "export" command!!

Please take a look into that! :slight_smile:

you can pass them via parameters also i.e ./Create_Input_Deck PARAMETER1 PARAMETER2 ....

and then using in subscript
p1=$1 which is PARAMETER1
p2=$2 which is PARAMETER2
. .
. .
and if you have requirement similar to global variable then EXPORT would be the best bet