3

In a bash shell (A), typing an ` (accent-grave) will start another shell prompt (B). The output of any command entered in B is a command for A.

$ `
> whoami`
-bash: Joe: command not found

(If my username were Joe.)

$ man `
> `
What manual page do you want?

Is there a man page for this, preferably with some examples?

Anthon
  • 79,293
RolfBly
  • 827

1 Answers1

6

It is in the bash manual. Search for backquote (substitution)

When  the  old-style  backquote form of substitution is used, backslash
retains its literal meaning except when followed by $, `,  or  \.   The
first backquote not preceded by a backslash terminates the command sub‐
stitution.  When using the $(command) form, all characters between  the
parentheses make up the command; none are treated specially.

Command substitutions may be nested.  To nest when using the backquoted
form, escape the inner backquotes with backslashes.

I find $() easier to use, especially when nesting things.

Anthon
  • 79,293