Question

I am trying to automatically set up several variables for SGE system but get no luck.

#!/bin/bash

myname="test"
totaltask=10

#$ -N $myname
#$ -cwd
#$ -t 1-$totaltask

apparently $myname will not be recognized. any solution?

thanks a lot

Was it helpful?

Solution

Consider making a wrapper function

qsub_file.sh

#!/bin/bash
#$ -V
#$ -cwd

wrapper_script.sh

#!/bin/bash
myname="test"
totaltask=10
qsub qsub_script.sh -N ${myname} -t 1-${totaltask}
Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top