Q:

How to separated zero with point in my bash script?

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 ?

A:

If your libc supports it, the ' flag in a printf specifier will add groupers to a number.
$ LC_NUMERIC=en_US printf "%'d\n" 100000
100,000
$ LC_NUMERIC=fr_FR printf "%'d\n" 100000
100 000
$ LC_NUMERIC=de_DE printf "%'d\n" 100000
100.000
$ LC_NUMERIC=bn_IN printf "%'d\n" 100000
1,00,000

