title: Increment variable value by 1 (shell programming)
body: <p>I can't seem to be able to increase the variable value by 1. I have looked at <a href="http://www.tutorialspoint.com/unix/unix-basic-operators.htm" rel="noreferrer">tutorialspoint's <em>Unix / Linux Shell Programming</em> tutorial</a> but it only shows how to add together two variables.</p>
  <p>I have tried the following methods but they don't work:</p>
  <pre><code>i=0
  
  $i=$i+1 # doesn't work: command not found
  
  echo &quot;$i&quot;
  
  $i='expr $i+1' # doesn't work: command not found
  
  echo &quot;$i&quot;
  
  $i++ # doesn't work*, command not found
  
  echo &quot;$i&quot;
  </code></pre>
  <p>How do I increment the value of a variable by 1?</p>