Does qsub pass command line arguments to my script?

becko picture becko · Oct 21, 2014 · Viewed 16.1k times · Source

When I submit a job using

qsub script.sh

is $@ setted to some value inside script.sh? That is, are there any command line arguments passed to script.sh?

Answer

dbeer picture dbeer · Oct 22, 2014

You can pass arguments to the job script using the -F option of qsub:

qsub script.sh -F "args to script" 

or inside script.sh:

#PBS -F arguments

This is documented here.