How to generate a numbers
0.01, 0.02, 0.03 ... until 0.2
in bash ?
i run this example but it doesn't work
#!/bin/bash # # Script for running several experimentations one the same JVM # for ((i = 0; i < 0.1; i += 0.01)) do echo $i done
Simple and easy:
or (default +1)
The following script gives you an output like
Bash can only do math with integers, not floats, so you either have to use a different language, like awk or bc, or shift the problem into integer domain.
With bash, using integers