title: How can I submit multiple commands to an LSF under one job ID?
body: <p>I have ~3,500 jobs running <code>Beagle</code> to submit to an LSF using <code>bsub</code>. As the server I am using operates on a fair-share queuing system, I'm reluctant to have my queuing priority drop through the floor by running each job individually.</p>
  
  <p>As such, I have attempted to run through my commands using a for loop within a single <code>bsub</code> command...</p>
  
  <pre><code>cbsub -G cichlid -e beagle_e_%J -o beagle_o_%J
  -R'select[mem&gt;10000] rusage[mem=10000]' -M10000 -n 8 -q long sh -c
  'for sc in {014444451..014448004}; do
  /nfs/users/nfs_m/mm21/programs/jre1.7.0_71/bin/java -Xmx10000m -jar
  /nfs/users/nfs_m/mm21/programs/beagle4.0/beagle.r1398.jar
  gl=Passed_filtered_snps_round2_per_scaff/NW_${sc}_2.vcf nthreads=8
  ibd=true ibdtrim=200 phase-its=8 impute-its=8
  out=Passed_filtered_snps_round2_per_scaff/beagle_output_NW_${sc};done'
  </code></pre>
  
  <p>...but I just receive the error message: </p>
  
  <blockquote>
    <p>syntax error near unexpected token `do'</p>
  </blockquote>
  
  <p>I've heard of the blaunch command, which - as I understand it - will take every job and submit them under one job ID but I can't work out how to integrate it into my command without receiving the same error message. As far as I can tell, it should slot in just before the for loop.</p>
  
  <p>Is anyone able to tell me where I'm going wrong with my syntax or to suggest alternative methods of batch task submission under one job ID, please?</p>
  
  <p>Many thanks,</p>
  
  <p>Ian</p>