Programming commands for Shell scripts

Source: Internet
Author: User

1:test variable-get 80 to determine whether it is greater than [] =test

2: Use the regular expression to use [[]]

3: [[]] = = Same, string do not add "" to this wildcard character

=~ match, string do not add "", support extended regular expression

4:read reads the contents of the keyboard input assign one or more shell variables

Read-s Mate password for password-n 3 limit user input character length

-T 3 limit time, 3 second break

5:$-variable set+h close variable

6:export from local changes to environment variables

7: (()) used to assign values can be the most basic additive subtraction, let can also

8: XOR: The same as 0, the difference is 1 with or: The same is 1, the difference is 0

9:true 1 True false 0 false! Take counter

10:&& Short Circuit with example: CMD1 && cmd2 execute Command 2 When command 1 succeeds, command 2 does not execute if command 1 fails

11:| | Short Circuit or example: cmd1 && cmd2 Command 1 succeeded if Command 2 was not executed, command 1 failed, command 2 executed


Programming commands for Shell scripts

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.