Name
echo — stdin stdout - file -- opt --help --version
Synopsis
echo [options]strings
The echo command simply
prints its arguments:
$ echo We are having fun We are having fun
Unfortunately, there are several different echo commands with slightly different
behavior. There’s /bin/echo,
but Linux shells typically override this with a built-in command
called echo. To find out which
you’re using, run the command type
echo.
Useful options
|
|
Don’t print a final newline character. |
|
|
Recognize and
interpret escape characters. For example, try |
|
|
Don’t interpret
escape characters: the opposite of |
Available escape characters are:
|
|
Alert (play a beep) |
|
|
Backspace |
|
|
Don’t print the final
newline (same effect as |
|
|
Form feed |
|
|
Line feed (newline) |
|
|
Carriage return |
|
|
Horizontal tab |
|
|
Vertical tab |
|
|
A backslash |
|
|
Single quote |
|
|
Double quote |
|
|
The character whose
ASCII value is |
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Read now
Unlock full access