echo — Write Arguments to Standard Output

Synopsis

/usr/bin/echo [string...] 
/usr/ucb/echo [-n] [string...] 

Description

The echo command writes its arguments, separated by blanks and terminated by a newline, to the standard output. If you provide no arguments, only the newline character is written.

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

Note

The C shell, the Korn shell, and the Bourne shell all have echo built-in commands, which, by default, are invoked if you call echo without a full path name. See shell_builtins(1).

Options

/usr/ucb/echo
-n Do not add the newline to the output.

Note

The -n option is provided for transition for BSD ...

Get Solaris™ 7 Reference now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.