alexparkjw
alexparkjw

Reputation: 123

What does Grave accent (`) symbol do in terminal

When I type Grave accent(`) symbol in terminal, It is like down below.

>
>
>

What does Grave accent(`) symbol do?

Upvotes: 2

Views: 3016

Answers (1)

D. Mika
D. Mika

Reputation: 2808

The '>' is displayed because the shell 'waits' for the closing quote. From the man page:

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).

Upvotes: 3

Related Questions