title: Bash Script - Variable Scope in Do-While loop
body: <p>I have a do while loop where I am adding a variable to itself</p>
  
  <pre><code>while read line 
  do
        let variable=$variable+$someOtherVariable
  done
      return $variable
  </code></pre>
  
  <p>When I echo the value of $variable I get no output ...</p>
  
  <p>Is this the correct way to add some value back to the variable itself (i.e. i = i+j)
  Also, in the context of bash scripting what is the scope in this case..</p>