I'm trying to use integer variables within a bash script for submitting to Sun Grid Engine (using qsub). Can someone clarify why this does not work?
NUMCORES=32
#$ -pe mpi $NUMCORES
(gives the error "Unable to read script file because of error: Numerical value invalid! The initial portion of string "$NUMCORES" contains no decimal number)
But this does:
#$ -pe mpi 32
I've looked at some solutions which involve awk or bc but can't seem to make them work. Obviously I am new to bash scripting - thanks for any help!