<<END_SCRIPT 通过 bash 连接到 FTP 时
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/7285805/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me):
StackOverFlow
<<END_SCRIPT while connecting to FTP via bash
提问by Spencer
I have never written a shell-script before and am trying to understand this piece of code:
我以前从未编写过 shell 脚本,并且正在尝试理解这段代码:
ftp -n $HOST <<END_SCRIPT
quote USER $USER
quote PASS $PASSWD
put $FILE
quit
END_SCRIPT
exit 0
What does the <<END_SCRIPTsignify? And what is the quote call doing? Thanks in advance, again I am a super newb
是什么意思<<END_SCRIPT?报价电话在做什么?在此先感谢,我再次成为超级新手
采纳答案by ajreal
The <<is heredoc syntaxin bash
bash 中的<<is heredoc 语法
For the quote, put, quitis FTP command
对于quote, put, quitis FTP 命令

