echo - write arguments to standard output


echo args ...


The echo(1) utility prints its arguments on the standard output, separated by spaces. The echo(1) utility treats escape sequences specially, as described in the following paragraph.

If any of the following sequences of characters is encountered during output, the sequence is not output. Instead, the specified action is performed:

Output a backspace character.
Subsequent output is suppressed. This is normally used at the end of the last argument to suppress the trailing newline that echo would otherwise output.
Output a form feed.
Output a newline character.
Output a carriage return.
Output a (horizontal) tab character.
Output a vertical tab.
Output the character whose value is given by zero to three digits. If there are zero digits, a NUL character is output.
Output a backslash.

The echo(1) utility is implemented as a shell regular built-in command.


The backslash character (\) is standard to the shell and must be escaped:

 $ echo Here is a double backslash: \\\\

To output a message to standard error, enter

$ echo message >&2