I have written the following script to set some environment variables when needed:
#!/bin/sh
export BASE=/home/develop/trees
echo $BASE
export PATH=$PATH:$BASE
echo $PATH
Below the command and the results I can see on my terminal: the script runs, but the variables are not set at the end.
~$: ./script.sh
/home/develop/trees
/bin:......:/home/develop/trees
~$: echo $BASE
~$:
What is wrong?
. ./yourscript.sh