Hi nua, i realised my mistake. My initial run.sh script was
. Name
I ran the script and after that did a echo $NAME at the command promot.Nothing was printed.
I rewrote the code
.Name
echo $NAME
and ran again, JOE was printed. In the first case, echo $NAME yielded nothing because it was only executed after the run.sh was executed;hence whatever variables inherited could have been/probably lost.Since they are only valid for the lifetime of the run.sh script. In the second example, echo $NAME was done within the script.Therefore whatever variables inherited will still be valid.