The UNIX and Linux Forums  

Go Back   The UNIX and Linux Forums > Top Forums > Shell Programming and Scripting
Google UNIX.COM



View Single Post in UNIX Forums - Click on the Thread or Permalink to View Entire Thread -->
  #1 (permalink)  
Old 09-20-2007
sandeepb sandeepb is offline
Registered User
 

Join Date: Sep 2007
Posts: 11
Avoid "++ requires lvalue" Error in Loop Calculation

Hi All,

Please help me to perform sum of values in a loop, I am getting following error:

"total=0++432907765772: ++ requires lvalue"

where actual statement is as : total=$total+$amt

where amt can have +ve or -ve values

Thanks
Sandeepb
Reply With Quote
Remove advertisements
!!
Forum Sponsor