Forrest logo
back to the echo tool

echo:tldr:04010

echo: Print a text message. Note: quotes are optional.
$ echo "${Hello World}"
try on your machine

The command echo "${Hello World}" is used to display the text "Hello World" on the command line or console.

In this command, echo is a command to output/display text. The text to be displayed is specified within quotes. The ${} syntax is used for variables in many programming languages, but in this case, it doesn't represent a variable.

So, the double quotes " " in this command simply prevent the shell from interpreting the space between "Hello" and "World" as a separator between two different arguments. It treats everything between the quotes as a single argument, which is then displayed by the echo command.

Note that if you remove the double quotes, the command would be interpreted as echo Hello World, where Hello and World would be treated as two separate arguments to the echo command, and it would display them separately.

This explanation was created by an AI. In most cases those are correct. But please always be careful and never run a command you are not sure if it is safe.
back to the echo tool