how can I parametrize a shell script that is executed on a grid (started with qsub) ? I have a shell script, where I use getopts to read the parameters.
When I star
In addition to volk's answer, in order to reference the variables in the list (designated by -v) you simply use the name you define in your call. So, say you made a call to qsub as follows
qsub -v foo='qux' myRunScript.sh
Then myRunScript.sh could look something like this:
#!/bin/bash
#PBS -l nodes=1:ppn=16,walltime=0:00:59
#PBS -l mem=62000mb
#PBS -m abe
bar=${foo}
echo "${bar}"
Where the output would be
qux
Hope this helps!