ECHO(1V) — UNIX Programmer’s Manual
NAME
echo − echo arguments (sh only)
SYNOPSIS
echo arguments
DESCRIPTION
Echo writes its arguments on the standard output. Each argument is separated from the next by a single space character. The last argument is followed by a newline character (but see \c below).
The command takes no options - compare with echo(1). Escape sequences consisting of a \ character followed by one of the following characters are converted into single characters:
| input | output character | |||
| octal | decimal | character | description | |
| \b | 010 | 8 | ^H | backspace |
| \f | 014 | 12 | ^L | form feed |
| \n | 012 | 10 | ^J | newline |
| \r | 015 | 13 | ^M | carriage return |
| \t | 011 | 9 | ^I | tab |
| \v | 013 | 11 | ^K | vertical tab |
| \\ | 134 | 92 | \ | backslash |
Two other sequences are also interpreted:
\c Stop outputing arguments. Arguments up to this point are output with no following newline character.
\0[[d]d]d Where each d is an octal digit. This sequence is replaced by the corresponding character.
Sequences which consist of \ followed by anything else are not altered.
SEE ALSO
NOTES
Although echo is built in to sh(1) the shell still interprets escape sequences in the command arguments, thus escape sequences intended for echo must either themselves be escaped or the relevant arguments must be quoted.
System V