- html - 出于某种原因,IE8 对我的 Sass 文件中继承的 html5 CSS 不友好?
- JMeter 在响应断言中使用 span 标签的问题
- html - 在 :hover and :active? 上具有不同效果的 CSS 动画
- html - 相对于居中的 html 内容固定的 CSS 重复背景?
在浏览 SO 时,我有时会看到 EOFD,例如:
ftp -vn <$hostname> <<EOFD
是的,我试过谷歌但没有成功,以防万一你想知道。
最佳答案
在 the question you reference 的上下文中, EOFD
没有什么特别的意思,它只是 bash 的开始 here document .
来自Advanced Bash-Scripting Guide :
A here document is a special-purpose code block. It uses a form of I/O redirection to feed a command list to an interactive program or a command, such as ftp, cat, or the ex text editor.
COMMAND <<InputComesFromHERE
...
...
...
InputComesFromHEREA limit string delineates (frames) the command list. The special symbol
<<
precedes the limit string. This has the effect of redirecting the output of a command block into thestdin
of the program or command. It is similar tointeractive-program < command-file
, wherecommand-file
containscommand #1
command #2
...The
here document
equivalent looks like this:interactive-program <<LimitString
command #1
command #2
...
LimitStringChoose a
limit string
sufficiently unusual that it will not occur anywhere in the command list and confuse matters.
所以在那个问题中,作者正在向 ftp
发送命令就像交互式地使用它一样。
关于bash - EOFD 是什么意思?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/10020145/
在浏览 SO 时,我有时会看到 EOFD,例如: ftp -vn <
我是一名优秀的程序员,十分优秀!