title: Propagate value of variable to outside of the loop
body: <pre><code>dpkg --list |grep linux-image |grep "ii  " | while read line
  do
    arr=(${line})
    let i=i+1
    _constr+="${arr[2]} "
  done
  echo $i
  echo ${_constr}
  </code></pre>
  
  <p>The echo statements outside of the loop do not display the expected variables.</p>
  
  <p>How should I make the contents of the variable propagate outside the loop?</p>