title: how to get the job id from qsub
body: <p>I am using a cluster. I will use qsub command to distribute my job, what I want is I can get back the job id so that I can monitor the job.</p>
  
  <p>Basically, I want some thing like this:</p>
  
  <pre><code>#!/bin/bash
  JOBID=$( qsub job1 )
  # Monitoring base on $JOBID
  </code></pre>
  
  <p>I found a page <a href="http://wiki.ibest.uidaho.edu/index.php/Tutorial:_Submitting_a_job_using_qsub" rel="noreferrer">http://wiki.ibest.uidaho.edu/index.php/Tutorial:_Submitting_a_job_using_qsub</a>, and it talks about a variable <code>PBS_JOBID</code> but I don't know how to use it. Does anyone know how to do it?</p>
  
  <p>(My solution now is <code>jobID='qsub task | cut -d ' ' -f 3'</code>)</p>