title: bash: Assign variable from pipe?
body: <p>In <code>bash</code>, what's the most efficient way to assign a variable using piped input -- using only left to right syntax?  Suppose the left side of the pipe is <code>seq 3</code>, so we'd want:</p>
  
  <pre><code>seq 3 | x=&lt;put some code here&gt;
  </code></pre>
  
  <hr>
  
  <p>NB: Not an answer, although probably functionally equivalent:</p>
  
  <pre><code>x=`seq 3`
  </code></pre>
  
  <p>...because <code>seq 3</code> is not on the <em>left</em> side of a pipe.</p>
  
  <p>For this Q, please ignore the possibility of exceeding the variable's memory, which pipes could certainly do.</p>