I have the following shell script
TEST=/foopath
export TEST
It is in a file called test.sh
and on which I ran chmod +x test.sh
When I run ./test.sh
I expect that I can then execute echo $TEST
and see the output /foopath
but I see nothing.
What changes are needed to make the above script export the variable $TEST
when I run ./test.sh
. Is this a bash vs. zsh difference?
source
command.source test.sh
– Costas Nov 27 '16 at 18:06