echo

This command writes the associated text to the console.

Syntax

echo "text"

Parameters

"text"
Specifies the text to echo to the console. Because the text can include spaces, enclose the value in double quotation marks.

Guidelines

The echo command writes the associated text to the console. The primary intent of this command is for use in shell scripts to help you troubleshoot a shell script. You might want to include an echo command in the following places in your shell script to know its processing.
  • Before another command in the shell script to identify what is about to happen or is supposed to happen
  • After another command in the shell script to identify what just happened or what was supposed to happen
  • Before and after another command in the shell script to identify full processing with entry and exit statements