Multi-command execution under Linux

Source: Internet
Author: User

Linux under multiple command execution:


1. Executes multiple commands and does not ensure that each execution succeeds.
Multiple commands are separated by a semicolon (;), for example: Command1 | | command2 | | Command3 Three commands are executed, not ensuring that each command executes successfully.


2. Execute multiple commands and stop subsequent command execution after encountering a failed command.
Logical AND (&&) operations between multiple commands, such as: Command1 && command2 && command3 Three command one failed to stop subsequent command execution.


3. Execute multiple commands and stop subsequent command execution after encountering successful command execution.
Logic between multiple commands or (| |) Operations, such as: Command1 | | Command2 | | Command3 Three commands a success stops subsequent lives.
The execution of the order.

This article is from the "Red Horse Red" blog, please be sure to keep this source http://aiilive.blog.51cto.com/1925756/1684139

Multi-command execution under Linux

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.