I want to use decimal values in shell script but it's not working. I am not getting decimal value. There are few posts which are suggesting to use 'bc' utility of linux. But on my machine 'bc' is not installed and i have no access to install any utility. Now is it possible to handle decimal values without bc . Demo code-:
calculatePercentage()
{
Value1=$1
Value2=$2
val=`expr $Value1 / $Value2`
echo $val
}
h=`calculatePercentage "150" "200"`
echo $h
Output -:
1