Linux tips and tricks
From Dr Nichols on script files:
Make a script file, .sh
must begin "#!/bin/bash"
Give it execute permissions
chmod +x test.sh (Important! If not script will not run!)
and be sure to re-direct all output to a log file
Then when you run the script, put it in the background
Here is my test.sh file
matlab -nojvm -nodisplay < doit.m > test2.log 2>&1
Also, how to start up matlab and add path to matlab every login
Edit ./.bashrc, using say, emacs i.e. at the prompt type "emacs ./.bashrc"
Add the following lines:
module add matlab
for example, given that I put the spm8 files into /home/spm8/
Useful commands to view log files are cat, tail etc.