Shell (6)-command execution sequence

Source: Internet
Author: User
1. Run the &: & command on the left (command 1) To return the true result (0 is returned, and the result is successfully executed), and run the & command on the right (command 2) can be executed;

2. Run |: if | the command on the left (command 1) is not executed successfully, run | command on the right (command 2); 3. Run () and {} combine commands: In order to execute a group of commands in the current s h e l, you can use the command separator to separate each command, and enclose all commands in parentheses. If {} is used to replace (), the corresponding command will be executed as a whole in the child s h e l instead of the current s h e l, only when the output of all commands in {} is redirected as a whole, the commands are placed in the sub-s h e l for execution, otherwise, it is executed in the current s h e l.
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.