title: How to add numbers in unix using loop for command?
body: <p>Could someone please help me out with loop problem. I need it to display the total of all the numbers. This is what i have tried so far:</p>
  
  <pre><code>sum=0  
  for numbers in 6 9 -4 7   
  do   
     sum=$(($sum+$numbers))    
  echo $sum 
  done
  </code></pre>
  
  <p>The output shows these numbers:</p>
  
  <pre><code>6  
  15   
  11   
  18
  </code></pre>