I'm trying to ftp in a file if it doesn't already exist on my local host. The code is something like this...
mydir=/mydir
if [[ ! -s myfile ]]
then
ftp << EndFTP
open remotehost
ascii
prompt
cd /opt/newdir
get remotefile.log $mydir/myfile
close
EndFTP
fi
But I get the following error...
syntax error at line 40 : `<<' unmatched
What to do?
mydir=/mydir
if [[ ! -s myfile ]]
then
ftp << EndFTP
open remotehost
ascii
prompt
cd /opt/newdir
get remotefile.log $mydir/myfile
close
EndFTP
fi
But I get the following error...
syntax error at line 40 : `<<' unmatched
What to do?