title: Confusing syntax error near unexpected token 'done'
body: <p>I am trying to learn shell scripting, so I created a simple script with a loop that does nothing:</p>
  
  <pre><code>#!/bin/bash
  names=(test test2 test3 test4)
  for name in ${names[@]}
  do
          #do something
  done
  </code></pre>
  
  <p>however, when I run this script I get the following errors:</p>
  
  <blockquote>
    <p>./test.sh: line 6: syntax error near unexpected token done'<br>
     ./test.sh: line 6: done' </p>
  </blockquote>
  
  <p>What have I missed here? are shell scripts 'tab sensitive'?</p>