title: How to make calculations in if statement with decimals in bash script
body: <pre><code> #SET INITIAL SPEED
  initialspeed() {
  
  wpm=$2
  
  #CHECKS IF SPEED WAS GIVEN
  if [ -z "$wpm" ]
  then
  let wpm=0.6
  sleep $wpm
  
  #CHECK IF SPEED IS VALID
  elif [ $wpm &gt; 0.6 ]
  then
  echo Error speed is less than 100 wpm
  exit 3
  elif [ $wpm &lt; 0.06 ]
  then
  echo Error speed is more than 1000 wpm
  exit 3
  else
  sleep $wpm
  fi
  }
  </code></pre>
  
  <p>I am trying to set a speed for my sleep timer but I think I am running into problems because of the decimals in the <code>let</code> and <code>if statements</code>. How do I use decimals in a bash script? Examples would be appreciated. Thank you in advance</p>