How do I set a variable in the parent shell, from a subshell?
a=3 (a=4) echo $a
To change variables in a script called from a parent script, you can call the script preceded with a "."
a=3 echo $a . ./calledScript.sh echo $a
in calledScript.sh
a=4
Expected output
3 4