I have to bash scripts:
script1.sh
HELLO=hello
export HELLO
./script2.sh
echo $HELLO
script2.sh
echo $HELLO
HELLO=world
export $HELLO
The output is hello hello instead of hello world. How can I modify variables between scripts which call each other?
EDIT: Passing variables as arguments won't work. I don't know the number of variables which might be changed in script2.sh.