Linux command terminal print-echo

Source: Internet
Author: User
Tags echo command
Echo is the basic command for terminal printing. Use: $ echo & rdquo; helloworld & rdquo; $ echohellowo

Echo is the basic command for terminal printing. Use:

$ Echo "hello world"

$ Echo hello world

$ Echo 'hello world'

$ Echo $ PATH

[Name description]

By default, echo adds a line break symbol at the end of each line. option-n is used to ignore line breaks at the end of a line;

Exclamation point (!) It is a special symbol. if a string has an exclamation mark, it should not be placed in double quotation marks (""). You can also use escape characters without double quotation marks or single quotation marks:

$ Echo hello world!

$ Echo 'Hello world! '

$ Echo "hello world \!"

When the echo command without quotation marks is used, the semicolon (;) cannot be printed, because the semicolon is used as the command separator in the bash shell;

When you use the echo command of single quotes (''), baseh does not evaluate the variable ($ var) in single quotes, but only outputs as is;

$ Echo 'hello, $ vName .'

Hello, $ vName. # output this line;

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.