The Linux Newbie Guide  ⇒    Fundamentals     Advanced     Supplement   Command Index   ENG⇒中
All rights reserved, please indicate the source when citing
  

Displaying Text with the "echo" Command

The echo command is used to output strings to the screen. The basic usage of echo is: echo "STRING".

Example:
$ echo "apple"  ←Displays "apple" on the screen
apple
$ echo "apple" > file ←Redirects the display to a file
$ echo "apple II" >> file ←Redirects the display to a file
$ cat file ←Verify
apple
apple II

echo is commonly used in scripting languages and for user interactions.

For further explanation of the echo command, please refer to the provided link.