문제

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?

도움이 되었습니까?

해결책

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.

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top