Reputation: 123
When I type Grave accent(`) symbol in terminal, It is like down below.
>
>
>
What does Grave accent(`) symbol do?
Upvotes: 2
Views: 3016
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