module () { eval `/usr/bin/modulecmd sh $*` } #!/bin/sh -xv echo "Hello Matlab!" + echo 'Hello Matlab!' #copy data to temporay directory #jobdir=`pwd` #cp -r * $TMPDIR/ #cd $TMPDIR #set execution permissions for the matlab script and executable chmod u+x run_FGI_AA.sh + chmod u+x run_FGI_AA.sh chmod u+x FGI_AA + chmod u+x FGI_AA ls -l + ls -l ./run_FGI_AA.sh $MCRROOT/R2015a/v85 > matlabresults.txt + ./run_FGI_AA.sh /cvmfs/fgi.csc.fi/apps/sl6/matlab/R2015a/v85/R2015a/v85 exitcode=$? + exitcode=0 #Copy results from the temporary directory #back to the home directory of the grid job #mv matlabresults.txt $jobdir/ #tar zcvf results.tgz ./* echo "Bye Matlab!" + echo 'Bye Matlab!' exit $exitcode + exit 0