title: Redirecting output of bash for loop
body: <p>I have a simple BASH command that looks like</p>
  
  <pre><code>for i in `seq 2`; do echo $i; done; &gt; out.dat
  </code></pre>
  
  <p>When this runs the output of <code>seq 2</code> is output to the terminal and nothing is output to the data file (out.dat)</p>
  
  <p>I am expecting standard out to be redirected to out.dat like it does simply running the command <code>seq 2 &gt; out.dat</code></p>