title: Output for loop to a file
body: <p>I am trying to have a for loop output a text to a file 10 times. Here is what I have:</p>
  <pre><code>for ((i=1;i&lt;=10;i++)); do
      echo &quot;Hello World&quot; &gt;testforloop.txt
  done
  </code></pre>
  <p>This outputs <code>Hello World</code> once to the file <code>testforloop.txt</code>. If I don't output to file it prints <code>Hello World</code> to the screen 10 times.</p>