title: The eval command does not work inside a loop
body: <p>If I have a simple bash script <code>set_token.sh</code>:</p>
  
  <pre><code>#!/bin/bash
  
  output='export AWS_ACCESS_KEY_ID="111"
  export AWS_SECRET_ACCESS_KEY="222"
  export AWS_SESSION_TOKEN="333"'
  
  echo "$output" | while read line; do eval $line; done
  </code></pre>
  
  <p>Executed <code>set_token.sh</code> did not successfully set the 3 environment variables. However if I run eval on each line separately, it works.</p>
  
  <pre><code>$ eval 'export AWS_ACCESS_KEY_ID="111"'
  $ eval 'export AWS_SECRET_ACCESS_KEY="222"'
  $ eval 'export AWS_SESSION_TOKEN="333"'
  </code></pre>
  
  <p>Why is that so?</p>