title: syntax error for if statement in shell script
body: <p>I have been getting this error for about an hour now. It says:</p>
  
  <p>if: Expression Syntax</p>
  
  <p>when I try to run my shell script. I could not find the problem in the code so I shortened everything down to this simple conditional:</p>
  
  <pre><code>if [ $# -eq 0 ]
  then
  echo "ERROR - no arguments given"
  exit 1
  fi
  </code></pre>
  
  <p>I have looked all over the internet and this syntax appears to be flawless.. So why do I still get the if expression syntax error???</p>