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

Était-ce utile?

La 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}
Licencié sous: CC-BY-SA avec attribution
Non affilié à StackOverflow
scroll top