What is `echo -e`?

0144

The echo -e command in Bash is used to enable the interpretation of backslash escapes in the string that follows. Here's a breakdown:

  • echo: This command prints text to the terminal.
  • -e: This option allows the use of escape sequences, such as \n for a new line, \t for a tab, and others.

For example, using echo -e "Hello\nWorld" will output:

Hello
World

Without the -e option, the backslash escape sequences would be printed literally, and you wouldn't see the intended formatting. If you have more questions, feel free to ask!

0 Comments

no data
Be the first to share your comment!