how to add Integer number and a float number in unix shell script -
i have 2 numbers
value1=686
value2=228.35
i not able add integer , float. please me out result.
i running in bash.
echo 1 + 3.5 | bc awk "begin {print 1+3.5; exit}" python -c "print 1+3.5" perl -e "print 1+3.5"
just replace numbers variables, eg: echo $n1 + $n2 | bc
Comments
Post a Comment