echo (Shell Scripting)

Echo is the method of printing to standard output in a shell script. It accepts an unimited number of arguments, printing each one to the screen.

Standard Usage is:


echo Cool Beans

The output from echo can be easily redirected into a file using the > operator:


echo Cool Beans > MyCoolFile.txt

If you wanted to immediately trash the output, you can do so by redirecting the output to /dev/null


echo This will not show up on the screen > /dev/null
Unless otherwise stated, the content of this page is licensed under Creative Commons Attribution-ShareAlike 3.0 License