title: include bash script arguments when submitting via bsub
body: <p>I have the following shell script.</p>
  
  <pre><code>#!/bin/bash --login
  
  #BSUB -q q_ab_mpc_work
  #BSUB -J psipred
  #BSUB -W 01:00
  #BSUB -n 64
  #BSUB -o psipred.out
  #BSUB -e psipred.err
  module load compiler/gnu-4.8.0
  module load R/3.0.1
  export OMP_NUM_THREADS=4
  
  code=${HOME}/Phd/script_dev/rfpipeline.sh
  MYPATH=$HOME/Phd/script_dev/
  cd ${MYPATH}
  ${code} myfile.txt
  </code></pre>
  
  <p>in which I can use bsub to submit program to cluster:</p>
  
  <pre><code>bsub &lt; myprogram.sh
  </code></pre>
  
  <p>however I change the last line in my program to:</p>
  
  <pre><code>${code} $1
  </code></pre>
  
  <p>where I use a command line argument to specify the file, how can I pass this to bsub?</p>
  
  <p>I have tried:</p>
  
  <pre><code>bsub &lt; myprogram.sh myfile.text
  </code></pre>
  
  <p>however bsub will not accept <code>myfile.text</code> as a bash parameter.</p>
  
  <p>I have also tried</p>
  
  <pre><code>bsub &lt;&lt;&lt; myprogram.sh myfile.text
  ./myprogram.sh myfile.text | bsub
  bsub "sh ./myprogram.sh myfile.text"
  </code></pre>
  
  <p>what do I need to do?</p>