title: linux: how to redirect the running command in one line bsub in LSF job system?
body: <p>I am submitting jobs on cluster equiped with LSF job system.</p>
  
  <p>I don't like to write job script. I prefer one line <code>bsub</code>, such as</p>
  
  <pre><code>bsub -n 24 mpirun -n 24 ./a.out
  </code></pre>
  
  <p>It is running fine. But I want real time screen output.</p>
  
  <p>So I tried</p>
  
  <pre><code>bsub -n 24 mpirun -n 24 ./a.out &gt;stdout
  </code></pre>
  
  <p>But this won't work, because it just redirect the information of job submitting not the output of running command</p>
  
  <p>Though I know bsub provide <code>-o</code> and <code>-e</code> to redirect output. But these two command is not real time. As I tested, they save the whole screen output after the job completed. But this is not what I want. What is more, I also know <code>bpeek</code>, and this is not I want either.</p>
  
  <p><strong>So my question is how to correctly redirect the output of running command inside one line <code>bsub</code>?</strong>  I tried several way, make the command quoted, bracketed... all failed</p>