在bash中,可以使用form将文件作为参数放入"$(< file)"
。大概特殊的外壳文件在哪里$(<
?
在手册页的“命令替换”下:
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).
本文收集自互联网,转载请注明来源。
如有侵权,请联系[email protected] 删除。
我来说两句