echo(1) MPE/iX Shell and Utilities echo(1)
______________________________________________________________________
NAME
echo -- display arguments
SYNOPSIS
echo argument...
DESCRIPTION
echo writes its arguments to the standard output. echo accepts
these C-style escape sequences:
\a bell
\b backspace
\c removes any following characters including
\n and \r
\f formfeed
\n newline
\r carriage return
\t horizontal tab
\v vertical tab
\0num the byte with the numeric value specified
by the zero to three digit octal num
\\ backslash
echo follows the final argument with a newline unless it finds \c
in the arguments. Arguments are subject to standard argument
manipulation.
EXAMPLES
One important use of echo is to expand file names on the command
line, as in:
echo *.[ch]
This displays the names of all files with names ending in .c or
.h, typically C source and header files. echo displays the names
on a single line. If there are no file names in the current
directory that end in or .h, echo simply displays the string
*.[ch].
echo is also convenient for passing small amounts of input to
other filters:
echo 'this is\nreal handy' | banner
DIAGNOSTICS
echo always returns the status value:
0 Successful completion.
1
echo(1) MPE/iX Shell and Utilities echo(1)
______________________________________________________________________
Messages
Because this utility is built into the MPE/iX Shell, see the
sh(1) man page for a complete list of error messages that you may
receive when using it.
PORTABILITY
POSIX.2. x/OPEN Portability Guide 4.0. UNIX System V.
The POSIX.2 standard does not include the escape sequences, so a
strictly conforming application cannot use them. printf is sug-
gested as a replacement.
On older UNIX systems, the backslash escape sequences are not
available; the -n option is equivalent to \c embedded in an argu-
ment.
NOTE
echo is provided as both an external utility and as a built-in
shell utility.
MPE/iX NOTES
For information on how the current MPE/iX implementation may
affect the operation of this utility, see Appendix A, MPE/iX
Implementation Considerations.
SEE ALSO
sh(1)
2