Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

<<END_SCRIPT while connecting to FTP via bash

Tags:

bash

shell

ftp

I have never written a shell-script before and am trying to understand this piece of code:

ftp -n $HOST <<END_SCRIPT
quote USER $USER
quote PASS $PASSWD
put $FILE
quit
END_SCRIPT
exit 0

What does the <<END_SCRIPT signify? And what is the quote call doing? Thanks in advance, again I am a super newb

like image 370
Spencer Avatar asked Oct 11 '22 02:10

Spencer


1 Answers

The << is heredoc syntax in bash

For the quote, put, quit is FTP command

like image 51
ajreal Avatar answered Oct 15 '22 20:10

ajreal