开发者

<<END_SCRIPT while connecting to FTP via bash

开发者 https://www.devze.com 2023-04-02 05:47 出处:网络
I have never written a shell-script before and am trying to understand this piece of code: ftp -n $HOST <<END_SCRIPT

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
开发者_如何学Go

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


The << is heredoc syntax in bash

For the quote, put, quit is FTP command

0

精彩评论

暂无评论...
验证码 换一张
取 消