echo — Output some text to standard output
echo [-n] [-e] {text}
-ndo not output the trailing newline
-eenable interpretation of the backslash-escaped characters
texttext to display
This command is used to display text on the output console. One use is in scripts to indicate what actions are being performed.
If the -e option is used, the following sequences are recognised:
Table 7. Escaped echo characters
| Character | Result |
|---|---|
| \0NNN | the character whose ASCII code is NNN (octal) |
| \\ | backslash |
| \a | alert (BEL) |
| \b | backspace |
| \c | suppress trailing newline (same as the -n option) |
| \f | form feed |
| \n | new line |
| \r | carriage return |
| \t | horizontal tab |
| \v | vertical tab |
Example 48. Using the echo command
>echo pepper;echo fish pepper fish >echo -n pepper;echo fish pepperfish >