In the shell script, simply include the following:
PATH="$PATH:/usr/local/proc_mt/bin:usr/local/MATLAB/MATLAB_Production_Server/R2015a/bin"
If there are executables with the same name as other executables in your $PATH
, and you wish to give the Matlab executables preference over the others, put it before your current environment $PATH
like so:
PATH="/usr/local/proc_mt/bin:usr/local/MATLAB/MATLAB_Production_Server/R2015a/bin:$PATH"
In some scenarios you may need to export this environment variable by doing
export PATH=[the solutions I listed above]
...which can never hurt (and in some cases may make obscure issues easier to troubleshoot)
The issue you are probably experiencing is that you are setting the $PATH
in your shell, and the actual script is defaulting to the default environment $PATH
. You can avoid this, as said before, by explicitly setting the $PATH
from within the script itself.
/
at the beginning ofusr/local/MATLAB
... ? – RobertL Nov 24 '15 at 05:35