You copied the Doc URL to your clipboard.

echo

This command displays textual strings only.

Backslashes can be used as follows:

  • C escape sequences, for example, "\n" can be used to print a new line

  • Leading and trailing spaces are not displayed unless escaped with a backslash

  • Quoted strings are printed literally including the quote marks.

Syntax

echo string

Where:

string

Specifies a string of characters.

Example

echo "   initializing..."    # Display: "   initializing..." (includes quotes)
echo Stage 1\n               # Display: Stage 1 (followed by a new line)
echo \   Init                # Display:    Init (includes leading spaces)
echo 4+4                     # Display: 4+4