Museum

Home

Lab Overview

Retrotechnology Articles

⇒ Online Manual

Media Vault

Software Library

Restoration Projects

Artifacts Sought

Related Articles

csh(1)

sh(1)

echo(1)

NAME

echo − echo arguments

SYNOPSIS

echo [ arg ] ... 
echo [ −n ] [ arg ] ... 

DESCRIPTION

echo writes its arguments separated by blanks and terminated by a new-line on the standard output. 

The sh(1) and ksh(1) versions understand the following C-like escape conventions; beware of conflicts with the shell’s use of \:

\b backspace

\c print line without new-line

\f form-feed

\n new-line

\r carriage return

\t tab

\v vertical tab

\\ backslash

\0n where n is the 8-bit character whose ASCII code is the 1-, 2- or 3-digit octal number representing that character. 

The following option is available only to csh(1) users. 

−n Do not add the newline to the output. 

echo is useful for producing diagnostics in command files, for sending known data into a pipe, and for displaying the contents of environment variables. 

SEE ALSO

csh(1), sh(1). 

NOTES

echo is a shell builtin command.  /usr/bin/echo is also available as a non-builtin command that behaves like the sh version. 

When representing an 8-bit character by using the escape convention \0n, the n must always be preceded by the digit zero (0). 

For example, typing: echo ´WARNING:\07´ will print the phrase WARNING: and sound the “bell” on your terminal.  The use of single (or double) quotes (or two backslashes) is required to protect the “\” that precedes the “07”.

Following the \0, up to three digits are used in constructing the octal output character.  If, following the \0n, you want to echo additional digits that are not part of the octal representation, you must use the full 3-digit n.  For example, if you want to echo “ESC 7” you must use the three digits “033” rather than just the two digits “33” after the \0, i.e., use \00337 and not \0337. 

CX/UX User’s Reference Manual

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