Hi
I need a good way to pass variables from one script that is executede from another.
I have a script (subscript.ksh) defines a variable a=10
This subscript is executede by another script headscript.ksh that needs to use a.
What would be a good way to pass the variable along.
I ve tryede to export a byt the headscript.ksh does not catch it.
This is how the scripts look now.
headscript.ksh
subscript.ksh
This just does not work
Regards
Lhg
I need a good way to pass variables from one script that is executede from another.
I have a script (subscript.ksh) defines a variable a=10
This subscript is executede by another script headscript.ksh that needs to use a.
What would be a good way to pass the variable along.
I ve tryede to export a byt the headscript.ksh does not catch it.
This is how the scripts look now.
headscript.ksh
Code:
#!/bin/ksh
SUBSCRIPT=$HOME/subscript.ksh
$SUBSCRIPT
echo $a
subscript.ksh
Code:
#!/bin/ksh
export a=10
This just does not work
Regards
Lhg