tail head cat sleep
QR code linking to this page

Manual Pages  — ECHO


echo – write arguments to the standard output



echo [-n] [string ...]


The echo utility writes any specified operands, separated by single blank (‘ ’) characters and followed by a newline (‘\n’) character, to the standard output.

The following option is available:
  Do not print the trailing newline character.

The end-of-options marker - is not recognized and written literally.

The newline may also be suppressed by appending ‘\c’ to the end of the string, as is done by iBCS2 compatible systems. Note that the -n option as well as the effect of ‘\c’ are implementation-defined in IEEE Std 1003.1-2001 ("POSIX.1") as amended by Cor. 1-2002. For portability, echo should only be used if the first argument does not start with a hyphen (‘-’) and does not contain any backslashes (‘\’). If this is not sufficient, printf(1) should be used.

Most shells provide a builtin echo command which tends to differ from this utility in the treatment of options and backslashes. Consult the builtin(1) manual page.


The utility exits 0 on success, and >0 if an error occurs.


builtin(1), csh(1), printf(1), sh(1)


The echo utility conforms to IEEE Std 1003.1-2001 ("POSIX.1") as amended by Cor. 1-2002.


The echo command appeared in AT&T v2 .

ECHO (1) October 5, 2016

tail head cat sleep
QR code linking to this page

Please direct any comments about this manual page service to Ben Bullock.

"I liken starting one's computing career with Unix, say as an undergraduate, to being born in East Africa. It is intolerably hot, your body is covered with lice and flies, you are malnourished and you suffer from numerous curable diseases. But, as far as young East Africans can tell, this is simply the natural condition and they live within it. By the time they find out differently, it is too late. They already think that the writing of shell scripts is a natural act."
— Ken Pier, Xerox PARC