The echo command is used to display a line of text on the terminal. You can also use the echo command to write text to a file by providing the string after the echo command and redirecting to the file.


The syntax of the echo command is:

echo Command Examples

1. To echo the string on std op device:

2. To skip printing the trailing new line:

3. To enable the interpretation of backslash escapes (****):

Operator Interpretation
\ backslash
a alert (BEL)
b backspace
c produce no further output
e escape
f form feed
n new line
r carriage return
t horizontal tab
v vertical tab
NNN byte with octal value NNN (1 to 3 digits)
xHH byte with hexadecimal value HH (1 to 2 digits)

4. To disable interpretation of backslash escapes:

5. To display the help:

6. To display the version: