When i run
p=0.1 k=2 while [ $p \< 1 ] do echo $p p=$(echo "scale=2; $p*$k" | bc) done
i have this result
0.1 .2 .4 .8
What can i do to have 0.1, 0.2, 0.4 and 0.8 ?
closed as off topic by Rinzwind, hhlp, LnxSlck, Jorge Castro, Tachyons Nov 20 '12 at 18:47
Questions on Ask Ubuntu are expected to relate to Ubuntu within the scope defined by the community. Consider editing the question or leaving comments for improvement if you believe the question can be reworded to fit within the scope. Read more about reopening questions here.If this question can be reworded to fit the rules in the help center, please edit the question.
I would do use seq and printf to solve my problem. check this:
Maybe this will help you to continue.