[solved] bash help

karstenanderson

Senior member
Sep 8, 2004
919
0
76
ok i'm trying to add some numbers as they come into sdin, but all i get for output is a string of the sum, not the actual math result. Output is "Total is 21+1+1+12+1+5+1+1+4+1+7+1+5+10+6+1+3+8+4+1+2+9+2+4+7+10+4+1+11+2+1+2+1+1+3+4+" which isnt what i'm lookin for

edit- stupid syntax, using this made it work
total=$(($i+$total))

i hate bash.