Real number calculation in shell script and store result to third variable , lets say a=5.66, b=8.67, c=a+b?


#!/bin/bash
#
a=5.66
b=8.67
c=`echo $a + $b | bc`
echo "$a + $b = $c"

No comments:

Post a Comment

Thank You for your Comments, We will read and response you soon...