Shell script usage of some basic statements

Source: Internet
Author: User
Tags case statement

A. For statement

1. Use the For statement to add users in bulk

650) this.width=650; "src=" http://s3.sinaimg.cn/bmiddle/006OWCmEzy7cGLCj6ued2&690 "Name=" Image_operate_ 75451500196244212 "alt=" shell script some basic statements of the use of "title=" shell script some basic statement usage "style=" margin:0px;padding:0px;border:0px; List-style:none; "/>


2. Use the For statement to check if the host can ping properly

650) this.width=650; "src=" http://s15.sinaimg.cn/mw690/006OWCmEzy7cGLIvb304e&690 "width=" 608 "height=" 217 "name = "image_operate_73311500196265694" alt= "shell script some basic statement usage" title= "shell script some basic statement usage" style= "margin:0px;padding:0px; Border:0px;list-style:none; "/>
Two: While statement

1. Use the While statement to add users by user name rule

650) this.width=650; "src=" http://s2.sinaimg.cn/bmiddle/006OWCmEzy7cGLO8LjH01&690 "Name=" Image_operate_ 61131500196272169 "alt=" shell script some basic statements of the use of "title=" shell script some basic statement usage "style=" margin:0px;padding:0px;border:0px; List-style:none; "/>

2. Using the while statement to write a guess price script

650) this.width=650; "src=" http://s13.sinaimg.cn/mw690/006OWCmEzy7cGLSK09ecc&690 "Name=" Image_operate_ 29211500196276390 "alt=" shell script some basic statements of the use of "title=" shell script some basic statement usage "style=" margin:0px;padding:0px;border:0px; List-style:none; "/>
Three: Case statement

1. Writing a test character type script with a case statement

650) this.width=650; "src=" http://s11.sinaimg.cn/mw690/006OWCmEzy7cGLYc0sOfa&690 "width=" 426 "height=" 221 "name = "image_operate_16961500196280273" alt= "shell script some basic statement usage" title= "shell script some basic statement usage" style= "margin:0px;padding:0px; Border:0px;list-style:none; "/>
2. Writing a service state control script using case statements

650) this.width=650; "src=" http://s5.sinaimg.cn/mw690/006OWCmEzy7cGM2O8OE74&690 "width=" 610 "height=" 379 "name= "image_operate_9721500196279284" alt= "shell script some basic statement usage" title= "shell script some basic statement usage" style= "margin:0px;padding:0px; Border:0px;list-style:none; "/>


This article from "[email protected] yan Xiao Crazy" blog, reproduced please contact the author!

Shell script usage of some basic statements

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.