Hello,
I'm working on a SGE cluster and trying to echo the variables passed to the qsub command.
My script is as follows
#!/bin/bash
#$ -V
#$ -cwd
#$ -pe make 10
if [ ! StatedUserName == "$StatedUserName" ] ; then
echo "Variable is not set"
else
echo "Variable says: $StatedUserName"
fi
and I run the following command
qsub -v StatedUserName="NB" hello.sh
and the log output is
Variable says: NB
The above is all fine. But When I run the command without the variable
qsub hello.sh
The log is
Variable says:
Why doesn't it throw an error or state
Variable is not set
Thank you