在bash中,可以使用"$(< file)"
形式将文件作为参数。可能是$(<
的特殊外壳的文档在哪里?
答案 0 :(得分:3)
它位于手册页中的&#34;命令替换&#34;:
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).