title: Increment issue using for loop
body: <p>Is there a certain syntax to use while using fractions or decimals in a bash script?</p>
  
  <p>I tried using the following script:</p>
  
  <pre><code>#!/bin/bash
  
  {
  
  n=9
  
  echo "$n"
  
  for (( i=.5; $i &lt;10; i++ ));
  
    do
    let "c=$i+1"
    echo $i "+" $c
  done
  
  }
  </code></pre>
  
  <p>This works with i=1, but it generates a syntax error when I put .5.</p>
  
  <p>Is there also a way to go by increments of 0.5 in the loop?</p>
  
  <p>Thank you!</p>