*** Welcome to piglix ***

Echo (command)


In computing, echo is a command in DOS, OS/2, Microsoft Windows, Singularity, Unix and Unix-like operating systems that outputs the strings it is being passed as arguments. It is a command typically used in shell scripts and batch files to output status text to the screen or a file.

Many shells, including all Bourne-like (such as Bash or zsh,) and Csh-like shells implement echo as a builtin command.

echo began within Multics, and became part of Version 2 Unix. echo -n in Version 7 replaced prompt, (which behaved like echo but without terminating its output with a line delimiter).

On PWB/UNIX and later Unix System III, echo started expanding C escape sequences such as \n with the notable difference that octal escape sequences were expressed as \0ooo instead of \ooo in C.

Eighth Edition Unix echo only did the escape expansion when passed a -e option, and that behaviour was copied by a few other implementations such as the builtin echo command of Bash or zsh and GNU echo.

Nowadays, several incompatible implementations of echo exist on different operating systems (often several on the same system), some of them expanding escape sequences by default, some of them not, some of them accepting options (the list of which varying with implementations), some of them not.


...
Wikipedia

...