.TH echo "" "" Command
.PC "Repeat/expand an argument"
\fBecho [\-n] [\fIargument ...\fB]\fR
.PP
.HS
.SH Option:
.IC \fB\-n\fR
Do not print terminal newline
.Pp
Copies all command arguments to the standard output,
with the following special-character sequences being
replaced with the equivalent ASCII character:
.IC \fB\eb\fR
Backspace
.IC \fB\ec\fR
Print line without a newline (like \fB\-n\fR option)
.IC \fB\ef\fR
Formfeed
.IC \fB\en\fR
Newline
.IC \fB\er\fR
Carriage return
.IC \fB\et\fR
Tab
.IC \fB\ev\fR
Vertical tab
.IC \fB\e\e\fR
Backslash
.IC \fB\e\fInnn\fR
\fInnn\fR is octal value of desired character
.HE
.B echo
prints each
.I argument
on the standard output, placing a space between each
.IR argument .
It appends a newline to the end of the output unless the
.B \-n
flag is present.
.PP
.B echo
recognizes the following special character sequences.
For each occurrence of the sequence,
it substitutes the corresponding ASCII character. 
.DS
.ta 1.0i 2.0i
	\eb	Backspace
	\ec	Print line without a newline (like \fB-n\fP option)
	\ef	Formfeed
	\en	Newline
	\er	Carriage return
	\et	Tab
	\ev	Vertical tab
	\e\e	Backslash
	\e0\fInnn	\fInnn\fR is octal value of character (\fBsh\fR only)
	\e\fInnn	nnn\fP is the octal value of character (\fBksh\fR only)
.DE
.PP
For example, when you enter the command:
.DM
	echo 'Please enter your name: \e007\ec'
.DE
.PP
The shell rings the bell and prints
.DM
	Please enter your name:
.DE
.PP
on your screen.
Note that the
.B \e007
sequence causes the terminal bell to sound, and that since the
.B \ec
sequence was specified,
the cursor will be left positioned after the colon.
.SH "See Also"
.Xr "commands," commands
.Xr "ksh," ksh
.Xr "sh" sh
.SH Notes
Under the Korn shell,
.B echo
is an alias for its built-in command
.BR print .
.PP
Please note that
.B echo
converts characters to spaces.
If you wish to preseve tab characters in an echoed string, you must
enclose it within quotation marks.
For example, the command
.DM
	echo $RECORD
.DE
.PP
displays:
.DM
	7 5 175 875
.DE
.PP
whereas the command
.DM
	echo "$RECORD"
.DE
.PP
displays:
.DM
	7	5	175	875
.DE
.PP
This is important when you use \fBecho\fR with programs for which the tab
character is significant.
