문제

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

도움이 되었습니까?

해결책

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}
라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top