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.
how to get the job_id in the sun grid system using qsub
-
17-01-2022 - |
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?
Solution
Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow