0

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

iiiir.com
  • 325
  • 5
  • 9

1 Answers1

0

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}
Arjun
  • 5,978
  • 3
  • 12
  • 10
  • sorry i no longer use qsub... thanks a lot for the answers. I accept it and hope it will be useful information to others. – iiiir.com Dec 18 '14 at 19:14