BASH: here-document at line n delimited by end-of-file (wanted `EOF’)

On one of our Debian hosts, we use bash scripts and cron jobs to automate certain tasks. One of these bash scripts downloads files from an FTP server and archives them. After upgrading the host machine to Debian 6.0.4, one of the bash scripts suddenly showed warnings:

/srv/foo/ line 146: warning: here-document at line 140 delimited by end-of-file (wanted `EOF')

Read the rest of this entry »