title: writing file using cat with here-document
body: <pre><code>$ cat &gt; out.txt &lt;&lt;EOF
  &gt; Hello world
  &gt; EOF
  $
  </code></pre>
  
  <p>How do I do this in single statement?<br>
  Somethig like 'echo' in following statement</p>
  
  <pre><code>$ for i in {1..5}; do echo "Hello world" &gt; out_$i.txt; done
  </code></pre>