Answer the question
In order to leave comments, you need to log in
Bash: Why doesn't EOF in if work?
Good afternoon.
Bash experts tell me why the following construction does not work? (swears at EOF)
If you remove the check, everything works, googled, tried the tips found, but nothing.
if [ "$doUpload" = "upload" ];
then
lftp -u $ftpUser,$ftpPassword $ftpServer <<EOF
set ftp:ssl-protect-data true
set ssl:verify-certificate no
put $backupName.tar.gz
bye
EOF
fi
exit 0
Answer the question
In order to leave comments, you need to log in
But it’s not good to do decorations.
EOF must be at the very beginning of the line.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question