Name

echo - Echo text arguments

Syntax

echo [ -n ] [ arg… ]

Description

Displays text arguments to your terminal. Spaces are automatically placed between arguments. Normally, echo will send a newline after printing the last argument, but it can be suppressed by including -n as the first argument.

Examples:

echo Hello, World!

Displays "Hello, World!" followed by a newline.

echo -n Wait...

Displays "Wait…" without a newline.

Output from echo can be directed to a file by including “>file” as the final argument. Appending is also supported by using“>>file”.

Echo is an excellent diagnostics command for tracking the execution of shell scripts.

See Also

csh(C), scripts(M)