Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR SHELL

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
 
PREVIOUS NEXT
Tagged: #bash #loop #decimals
ADD COMMENT
Topic
Name
3+9 =