Linux and Unix echo command
Quick links
About echo
Syntax
Examples
Linux and Unix main page
Echo's to the screen what you type after echo. Echo is useful for producing diagnostics in command files, for sending known data into a pipe, and for displaying the contents of environment variables.
echo [-n] text
| -n | On BSD and some variants derived from BSD does not begin a new line after the echoed text. |
| text | The text that you want to echo to the screen. |
echo Hello world
The above example would return "Hello world" to the console
echo * | wc
The above example would list a count of all the files and directories in the current directory.
