title: Syntax error: operand expected (error token is "+")
body: <p>I'm writing a script in bash and I get this error:</p>
  
  <pre><code>./P4.1: line 10: +: syntax error: operand expected (error token is "+")
  </code></pre>
  
  <p>And this is my code:</p>
  
  <pre><code>#!/bin/bash
  read string
  echo $string &gt;| temp
  num1= cut -d" " -f1 temp
  num2= cut -d" " -f2 temp
  num3= cut -d" " -f3 temp
  while [ $num1 -gt $num3 ]
  do
          echo $num1
          num1=$[$num1+$num2]
  done
  </code></pre>
  
  <p>What's wrong and how do I fix it?
  Thanks.</p>