Syntax of `echo` command in Linux
echo [option] [string]
Here,
[options] = The various options available for modifying the behavior of the `echo` command
[string] = It is the string that we want to display.
Basic Usage: Displaying Text/String:
The most straightforward usage of the echo command is to display a text or string on the terminal. To do this, you simply provide the desired text or string as an argument to the echo command.
Syntax:
echo [string]
Example:
If we want to display “Geeks for Geeks”. We use the following command.
echo "Geeks for Geeks"
echo command in Linux with Examples
The echo command in Linux is a built-in command that allows users to display lines of text or strings that are passed as arguments. It is commonly used in shell scripts and batch files to output status text to the screen or a file.