title: Cannot set modified line from while loop into a variable
body: <p>I have this simple bash command which purpose is store the line, modified by sed into a variable</p>
  <pre><code>unset x
  while read line; do
  echo $line'_db'|sed 's/- //g' | read x
  echo $x
  done &lt; &lt;(yq eval '.databases' ${databasesPath});
  </code></pre>
  <p>So far I have this, text file contains the line &quot;- name&quot;</p>
  <p>for some reason when I execute the above, and echo I get a blank line, as if nothing get stored into the variable? Whag am doing wrong.</p>
  <p>Beside the variable only need to exist within the scope of the while loop, and not outside, do need to declare it outside?</p>
  <p>Why?
  The modified has to parsed into a command within the same while loop, but cannot be parsed as it is read.</p>