Question

Consider a script, "run.sh", to be sent to a cluster job queue via qsub,

qsub ./run.sh

My question is how do I get the number of the process -- the one that appears as ${PID} on the files *.o${PID} and *.e${PID} -- within the script run.sh?

Does qsub export it? On which name?

Was it helpful?

Solution

Well, apparently qsub man page does not have, but this page says that the variable $JOB_ID is created with the PID I was asking for.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top