Museum

Home

Lab Overview

Retrotechnology Articles

⇒ Online Manual

Media Vault

Software Library

Restoration Projects

Artifacts Sought

Related Articles

sh(1)

echo(1)

NAME

echo − echo (print) arguments

SYNOPSIS

echo [arg] ...

DESCRIPTION

echo writes its arguments separated by blanks and terminated by a new-line on the standard output.  It also understands C-like escape conventions; beware of conflicts with the shell’s use of \:

\b backspace

\c print line without appending a new-line

\f form-feed

\n new-line

\r carriage return

\t tab

\v vertical tab

\\ backslash

\n the 8-bit character whose ASCII code is the 1-, 2-, 3- or 4-digit octal number n, whose first character must be a zero.

echo is useful for producing diagnostics in command files and for sending known data into a pipe. 

EXTERNAL INFLUENCES

Environment Variables LC_CTYPE determines the interpretation of arg as single and/or multi-byte characters. 

If LC_CTYPE is not specified in the environment or is set to the empty string, the value of LANG is used as a default for each unspecified or empty variable.  If LANG is not specified or is set to the empty string, a default of "C" (see lang(5)) is used instead of LANG.  If any internationalization variable contains an invalid setting, echo behaves as if all internationalization variables are set to "C".  See environ(5).

International Code Set Support

Single- and multi-byte character code sets are supported. 

SEE ALSO

sh(1). 

NOTES

Berkeley echo differs from this implementation.  The former does not implement the backslash escapes.  However, the semantics of the \c escape can be obtained by using the -n option.  The echo command implemented as a built-in function of csh follows the Berkeley semantics (see csh(1)).

BUGS

No characters are printed after the first \c.  This is not normally a problem. 

STANDARDS CONFORMANCE

echo: SVID2, XPG2, XPG3, POSIX.2

Hewlett-Packard Company  —  HP-UX Release 9.0: August 1992

Typewritten Software • bear@typewritten.org • Edmonds, WA 98026