I wish to write a script for users on my server to activate Anaconda. Now the documentation suggests I can activate the installed software environment afterwards by
eval "$(<path to anaconda>/bin/conda shell.bash hook)"
Other clues suggest that I can also activate it by
source <path to anaconda>/bin/activate
My problem is both approaches seem to work fine in the terminal (bash), but if I try to do it inside a bash script so as to provide my users an easy way to activate Anaconda, it has no effect outside that script. I am a bash novice, so I guess it is just me who does not know what to do. I am expecting to be able to do something like:
export <effects of eval'ing or source'ing some file>
But I only know how to export specific variables.