title: bash EOF in if statement
body: <p>I am trying to do an action in a IF ELSE statement in Bash, but receive an error like this one:</p>
  
  <p><i>Syntax error: end of file unexpected (expecting "fi")</i></p>
  
  <p>Now I am quite new to this, so probably the solution to my problem should not be that difficult :)</p>
  
  <pre><code>if [ "$DAYNAME" = 'Sunday' ]; then
      echo 'The backup will be uploaded'
      ftp -n $HOST &lt;&lt;EOF
          quote USER $USER
          quote PASS $PASSWD
          put $filetoday
          delete ${filethreeweeksago}
          quit
      EOF
  fi
  </code></pre>
  
  <p>Of course the vars are already filled.</p>
  
  <p>I think it has to do with the EOF notation, because when i remove them, the problem disapears. Unfortunatly I don't know how to use the code without the EOF notation. </p>
  
  <p>Can anyone tell me why this error is comming up?</p>