title: sbatch pass exit codes of dependent jobs
body: <p>I have some jobs started with sbatch, e.g.</p>
  
  <pre><code>a=$(sbatch ...)
  b=$(sbatch ...)
  </code></pre>
  
  <p>Now a third job is queued after a or b are done:</p>
  
  <pre><code>c=$(sbatch --dependency=afterany:$a:$b ...)
  </code></pre>
  
  <p>How can I pass the exit status of task a and b to the script of c?</p>