13

How declare and assign value to a variable?

view full story
linux-howto

http://www.unix.com – I need to have two variables and want to perform an addition with these variables in shell script. I am using the below script for this, but i have got expr: non-numeric argument error while running the same. Code: #!/bin/sh val1=10 val2=20 while [val1 -gt 5] do echo $val1 val1=$(expr $VAL + $BAL) done Please help me here. (HowTos)