The terminal is an interactive utility by which a user interacts with the shell environment. Printing text in the terminal is a basic task that most shell scripts and utilities need to perform regularly. Printing can be performed via various methods and in different formats.
echo is the basic command for printing in the terminal.
echo puts a newline at the end of every invocation by default:
$ echo "Welcome to Bash" Welcome to Bash
Simply using double-quoted text with the
echo command prints the text in the terminal. Similarly, text without double-quotes also gives the same output:
$ echo Welcome to Bash Welcome to Bash
Another way to do the same task is by using single quotes:
$ echo 'text in quote'