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"

Display text

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.

Similar Reads

Syntax of `echo` command in Linux

echo [option] [string]...

Options Available in `echo` command in Linux

NOTE :- -e here enables the interpretation of backslash escapes...

Conclusion

In this article we have discussed `echo` command in Linux which is a powerful and versatile tool and allows users to display lines of the text or strings on the terminal. Overall, we can say that by understanding the `echo` command experimenting with its features, we can effectively display message, variables, or any desired text in our Linux....