0

I am fairly new to Linux and all I know for sure about the command echo is that when you type a word after it, such as echo Linux!, it prints out Linux!. Is there anything else echo does?

I don't think it is a duplicate.

Zanna
  • 70,465
  • echo is usually a built-in command provided by the shell; see your shell's manual page for details. There is also an independent program named echo (/bin/echo), of course, with its own manual page. – AlexP Dec 19 '17 at 01:26
  • One important thing to know about echo is that you probably shouldn't use it. Use printf instead. – fkraiem Dec 19 '17 at 03:48

1 Answers1

4

The syntax for echo is:

echo [option(s)] [string(s)]

You can pass options to it in order to have a better intended results. As example, -e acts as interpretation of escaped characters that are backslashed. Using option \b – backspace with backslash interpretor -e which removes all the spaces in between.So when running the following command:

$ echo -e "Tecmint \bis \ba \bcommunity \bof \bLinux \bNerds" 

That produces:

TecmintisacommunityofLinuxNerds 

You can run man [command] to know what are its options.

man echo

Edit:

According to @Zanna comment which is attached to this answer. When we man echo, we are not showing the manual of the built-in echo . To read short documentation about the built-in echo we need to run help echo .