[GE users] setting qsub -N with a bash command line agrument

Reuti reuti at staff.uni-marburg.de
Fri Oct 24 13:57:21 BST 2008

Hi Jonathan,

Am 24.10.2008 um 14:42 schrieb Jonathan Meagher:

> I start a simulation with a bash script that I pass to qsub. I would
> like the job name (-N) to be set with an argument from the bash
> script, $1 etc.
> qsub doesn't recognise that $1 is a bash variable and takes the
> character literally

you mean, you have a line like

#$ -N $1

in the submitted bash script as I assume. You can use the opposite  

qsub -N foo script.sh

and in the script you can use $JOB_NAME instead of $1 where you need it.

(Another option would be to have a submit-script, which will create a  
jobscript on-the-fly and creates the appropriate lines for SGE. This  
is used frequently to hide the queuing system details from the users,  
as they are not programmers but e.g. scientists and students here.  
Let me know, if you need further details to implement it.)

-- Reuti

To unsubscribe, e-mail: users-unsubscribe at gridengine.sunsource.net
For additional commands, e-mail: users-help at gridengine.sunsource.net

More information about the gridengine-users mailing list