I am writing a backup script. I think my syntax is correct but it still gives me an error.
Here's my script:
if [ ! -f $LIST ]; then
    /usr/bin/tar -g $FULLLIST -zpcf $FULL $TGT
    cp $FULLLIST $DIFFLIST
    expect << EOF
    spawn /usr/bin/scp $FULL $HOST:$DST
    expect "password:"
    send "blahblah\r"
    expect eof
    EOF
    rm $FULL
elif [ $DAY == 01 ]; then
    *same as above*
elif [ $DAYOFWEEK == 0 ]; then
    *same as above*
else
    *same as above*
fi
The error is
Syntax error: end of file unexpected (expecting "fi")
When I type in "./webbackup.sh"
 
    