3

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.

4

1 回答 1

2

你可以试试

qsub -W depend=afterok:$(qsub job.sh) analyze.sh
于 2013-12-25T10:18:02.547 回答