Multi-command execution in Linux '; ' and ' && ' the difference explains _linux shell

Source: Internet
Author: User

Objective

Many commands are executed simultaneously during Linux operations or during day-to-day Linux operation, so that it needs to be handled through our multiple command methods. Multi-order execution includes '; ' And the ' && ' command so that the shell can execute multiple commands at once, with '; ' and ' && ' separated by each command. So what's the difference between the two, let's take a look at the next.

1, '; '

Use the '; '---------first to execute the next command, regardless of whether the first command went wrong.

2, ' && '

The ' && '--------is to execute the next command, similar to a short circuit, when the first command completes correctly.

Summarize

Well, the above is the entire content of this article, I hope the content of this article for everyone's study or work can bring certain help, if you have questions you can message exchange.

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.