Grave accent(`)符号在终端中做什么

时间:2017-03-06 06:31:32

标签: terminal symbols

当我在终端输入Grave accent(`)符号时,就像在下面一样。

>
>
>

Grave accent(`)符号有什么作用?

1 个答案:

答案 0 :(得分:2)

'>'显示是因为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).