title: Loop inside "heredoc" in shell scripting
body: <p>I need to execute series of commands inside an interactive program/utility with parameterized values. Is there a way to loop inside heredoc ? Like below .. Not sure if <code>eval</code> can be of any help here. Below example doesn't seem to work as the interactive doesn't seem to recognize system commands.</p>
  
  <pre><code>#!/bin/sh
  list="OBJECT1 OBJECT2 OBJECT3"
  utilityExecutable &lt;&lt; EOF
  for i in $list ; do
  utilityCommand $i
  done
  EOF
  </code></pre>