How to write config shell script to pass variables in master shell script?

Dear Unix gurus,

We have a config shell script file which has 30 variables which needs to be passed to master unix shell script that invokes oracle database sessions. So those 30 variables need to go through the database sessions (They are inputs) via a shell script. one of the variable name is input1, another one is input2....etc.

Please give me example of how the config shell script invokes another master shell script which connects to the oracle datbase & executes different sql scripts ....etc for database operations.

I am average programmer if i can understand small example i will write the code. Pls give me an example.

Thx,
Chris

$ cat db.config
input1=someinput
input2=someotherinput


$ cat myscript.sh
. db.config
echo $input1
echo $input2


$./myscript.sh
someinput
someotherinput
$
1 Like