문제

I have been looking for a simple way to capture the job ID of a job submitted by qsub. I saw a suggestion was given by providing a name to the job, and using that name. But that's an indirect method. I tried this way but getting an error

jobID="qsub job.sh"
35546.cell0  (This is the output I want to capture)

$jobID

qsub -W depend=afterok:$jobID analyze.sh

Can anyone please suggest a neat way to capture the job ID from qsub?

Thank you very much.

도움이 되었습니까?

해결책

You may try

qsub -W depend=afterok:$(qsub job.sh) analyze.sh
라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top