title: output a loop to a log file for separate file for each value
body: <p>lets say I have a script like this:</p>
  
  <pre><code>num1 = 3
  for i in $num1
    do
    echo "test $num1"
    echo "abcd"
    echo "foo"
  done
  </code></pre>
  
  <p>and I want to ouput the echo to a log file for each value in num1, how would one do that? So when this runs, it should create log1.log, log2.log, and log3.log.</p>