title: How do I subtract 1 from an array item in BASH?
body: <p>I have a side-project in BASH for fun, and I have this code snippet (<code>ARRAY[0]</code> is 8):</p>
  
  <pre><code>while [ $ALIVE == true ]; do
      $ARRAY[0] = ${ARRAY[0]} - 1
      echo ${ARRAY[0]}
  done
  </code></pre>
  
  <p>However, it comes back with this error:</p>
  
  <pre><code>line 16: 8[1]: command not found
  </code></pre>
  
  <p>I just started working in BASH, so I might be making an obvious mistake, but I've searched and searched for an answer to a problem like this and came up with no result.</p>