sftp autologin is working but ...

Dears,

I am new to linux scripting and I was look for a way to auto login to a server using sftp to download a file.
I found one and it is working fine. But i don't know the meaning of <<EOF in the code. Any one explain it to me:

#!/bin/sh  
HOST=yourservername
 USER=yourusername 
PASS=yourpassword  

echo "sftping file ..."  

lftp -u ${USER},${PASS} sftp://${HOST} <<EOF 
cd /tmp 
get tmpfile 
bye 

EOF  

echo "done"

It's meaning is in a "here-document".

Your shell man-page should describe the construct for you.

1 Like