Index of Section 1 Manual Pages
| Interix / SUA | echo.1 | Interix / SUA |
ECHO(1) System General Commands Manual ECHO(1)
NAME
echo - write arguments to the standard output
SYNOPSIS
echo [-n] [string ...]
DESCRIPTION
The echo utility writes any specified operands, separated by single blank
(` ') characters and followed by a newline (`\n') character, to the stan-
dard output. When no operands are given, only the newline is written.
The options are as follows:
-n Do not print the trailing newline character.
For echo the special argument -- will be treated as a regular string as
demanded by the standards (and history).
If any of the following escape sequences are encountered they will be
treated specially as described below:
\a Output an alert character (BEL) at this location.
\b Output a backspace character (BS) at this location.
\c Suppress the trailing newline (NL) normally printed as final out-
put (as the -n option). All remaining characters will be ignored.
\e Output an escape (ESC) character. This may not be portable.
\f Output a formfeed (FF) character.
\n Output a newline (NL) character.
\r Output a carraige return (CR) character.
\t Output a hoizontal tab (HT) character; this is a "regular tab".
\v Output a vertical tab (VT) character.
\\ Output a literal backslash character.
\0num Output the 8-bit character with the octal value num for zero,
one, two or three digits. It is recommended that three digits
always be used for absolute clarity of intent.
DIAGNOSTICS
The echo utility exits 0 on success or >0 if an error occurred.
SEE ALSO
ascii(1), printf(1), printf(3)
STANDARDS
The echo utility is IEEE Std 1003.2 (``POSIX.2'') and SUS.2 compatible.
The -n option is non-conforming for SUS.2, but most users expect the
option to be available.
NOTES
Some shells have a builtin echo command that performs differently than
this standard utility. If behavior is different than described here then
likely the cause is the shell builtin of echo is being used. In shell
scripts you should always provide the full path to the utility to ensure
correct behavior and avoid a trojan horse utility with the same name that
may be in the PATH of the user (i.e. /bin/echo).
Interix August 11, 2005 Interix