You can use either bc or awk. Using bc you have to specify the
scale that is the total number of decimal digits after the decimal point. For example:
Code:
$ echo "scale=4; 3.4 / 2.0" | bc
1.7000
$ echo "scale=9; 3.4 / 2.0" | bc
1.700000000
In awk you can perform floating point arithmetic and print the result accordingly using printf:
Code:
$ awk 'BEGIN{printf "%11.9f\n",3.4/2.0}'
1.700000000