当我在终端中输入重音(`)符号时,结果如下所示。
>
>
>
重音符号(`)是做什么用的?
发布于 2017-03-06 06:38:39
显示'>‘是因为shell’等待‘右引号。从手册页:
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 and replacing the com-
mand 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 command substitution $(cat
file) can be replaced by the equivalent but faster $(< file).
https://stackoverflow.com/questions/42618946
复制