在 bash 中,可以使用表单将文件作为参数"$(< file)"
。可能是特殊外壳的文档在哪里$(<
?
问问题
811 次
1 回答
4
它在手册页的“命令替换”下:
Command Substitution
Command substitution allows the output of a command to replace the com-
mand name. There are two forms:
$(command)
or
`command`
Bash performs the expansion by executing command in a subshell environ-
ment and replacing the command substitution with the standard output of
the command, with any trailing newlines deleted. Embedded newlines are
not deleted, but they may be removed during word splitting. The com-
mand substitution $(cat file) can be replaced by the equivalent but
faster $(< file).
于 2017-01-23T01:45:35.283 回答