My script
echo -n "number 1 : ";
read bil1
echo -n "number 2 :";
read bil2
jlh=$(echo $bil1 + $bil2 |bc -l |sed -e 's/^\./0./' -e 's/^-\./-0' -e 's/\.0*$//');
echo " Your result : $bil1 + $bil2 = $jlh";
if I input " 100000 " in $bil1 and "100000 " in $bil2 , the result is " 200000 ".
I want :
Your result : 100000 + 100000 = 200.000
how to separated zero with " . " for that result from 200000 to 200.000 ?
If your libc supports it, the
'
flag in aprintf
specifier will add groupers to a number.