Answers for "bash for loop with decimals"

0

bash for loop with decimals

you cannot do that, bash do not support floting arithmatics.
use bash sequences indead
bash for loos do not start from fractions like 0.5 0.25 .. only support intigers 

for i in $(seq 3.0 0.1 4.5); 
do 
  echo $i; 
done
Posted by: Guest on February-25-2022

Code answers related to "Shell/Bash"

Browse Popular Code Answers by Language