This blog post describes the common conditions and looping statements in shell scripts:
Conditional statements:
650) this.width=650; "Src=" https://s4.51cto.com/wyfs02/M01/06/B7/wKiom1m8ytPDGg7MAAB1t9_5n8Q866.png-wh_500x0-wm_ 3-wmp_4-s_2860871127.png "title=" 4.PNG "alt=" Wkiom1m8ytpdgg7maab1t9_5n8q866.png-wh_50 "/>
650) this.width=650; "Src=" https://s4.51cto.com/wyfs02/M01/A5/67/wKioL1m8yqbwwagtAABjimNDPgg179.png-wh_500x0-wm_ 3-wmp_4-s_2245003293.png "title=" 5.PNG "alt=" Wkiol1m8yqbwwagtaabjimndpgg179.png-wh_50 "/>
Loop statement:
650) this.width=650; "src=" Https://s2.51cto.com/wyfs02/M01/06/B8/wKiom1m85Ujh_CliAADW8iTjaj0281.png "style=" width : 500px;height:147px; "title=" 3.PNG "width=" "height=" 147 "border=" 0 "hspace=" 0 "vspace=" 0 "alt=" wkiom1m85ujh_ Cliaadw8itjaj0281.png "/>
650) this.width=650; "src=" Https://s2.51cto.com/wyfs02/M01/A5/68/wKioL1m85RuStYTHAAEP3Y0uARc766.png "style=" width : 500px;height:179px; "title=" 11.PNG "width=" "height=" 179 "border=" 0 "hspace=" 0 "vspace=" 0 "alt=" Wkiol1m85rustythaaep3y0uarc766.png "/>
Example:
If statement:
Eg1.
650) this.width=650; "src=" Https://s1.51cto.com/wyfs02/M01/06/B8/wKiom1m84nKBxVPFAAApB8IAI0o408.png "title=" IF1. PNG "width=" "height=" 216 "border=" 0 "hspace=" 0 "vspace=" 0 "style=" width:500px;height:216px; "alt=" Wkiom1m84nkbxvpfaaapb8iai0o408.png "/>
EG2.
650) this.width=650; "src=" Https://s4.51cto.com/wyfs02/M02/A5/68/wKioL1m84IXTlyA4AABuZdzfFnM224.png "title=" if. PNG "width=" "height=" 435 "border=" 0 "hspace=" 0 "vspace=" 0 "style=" width:500px;height:435px; "alt=" Wkiol1m84ixtlya4aabuzdzffnm224.png "/>
2.case statement:
A simple Case statement:
650) this.width=650; "Src=" https://s2.51cto.com/wyfs02/M02/06/B7/wKiom1m8zeCDE9ssAAA0uKo7qnY589.png-wh_500x0-wm_ 3-wmp_4-s_3018328855.png "title=" 8.PNG "alt=" Wkiom1m8zecde9ssaaa0uko7qny589.png-wh_50 "/>
Case statements in conjunction with loops:
650) this.width=650; "Src=" https://s1.51cto.com/wyfs02/M01/A5/67/wKioL1m8zk7DIGchAABT9pp5fTA968.png-wh_500x0-wm_ 3-wmp_4-s_4053918872.png "title=" 9.PNG "alt=" Wkiol1m8zk7digchaabt9pp5fta968.png-wh_50 "/>
3.for statement:
Simple for statement: EG1.
650) this.width=650; "Src=" https://s1.51cto.com/wyfs02/M01/A5/67/wKioL1m80mrg_AQxAAAr5_LcgQc167.png-wh_500x0-wm_ 3-wmp_4-s_242401426.png "title=" for. PNG "alt=" Wkiol1m80mrg_aqxaaar5_lcgqc167.png-wh_50 "/>
EG2.
650) this.width=650; "src=" Https://s2.51cto.com/wyfs02/M02/06/B8/wKiom1m84IGCmubEAAAcrbV1GpI163.png "title=" For1. PNG "width=" "height=" 234 "border=" 0 "hspace=" 0 "vspace=" 0 "style=" width:500px;height:234px; "alt=" Wkiom1m84igcmubeaaacrbv1gpi163.png "/>
The for statement that matches the case: Eg3.
650) this.width=650; "Src=" https://s1.51cto.com/wyfs02/M02/06/B7/wKiom1m81Svhe1YkAABqf-mQMoM817.png-wh_500x0-wm_ 3-wmp_4-s_2817982661.png "title=" for. PNG "alt=" Wkiom1m81svhe1ykaabqf-mqmom817.png-wh_50 "/>
4.while statement:
Eg1.
650) this.width=650; "Src=" https://s5.51cto.com/wyfs02/M02/A5/67/wKioL1m81IPSpOOFAAAoS8DZm5g257.png-wh_500x0-wm_ 3-wmp_4-s_2830512241.png "title=" While1. PNG "alt=" Wkiol1m81ipspoofaaaos8dzm5g257.png-wh_50 "/>
EG2.
650) this.width=650; "Src=" https://s4.51cto.com/wyfs02/M00/06/B7/wKiom1m81GXDbaGoAAAyQ9C-NFM151.png-wh_500x0-wm_ 3-wmp_4-s_3880358083.png "title=" while. PNG "alt=" Wkiom1m81gxdbagoaaayq9c-nfm151.png-wh_50 "/>
5.util statement:
650) this.width=650; "Src=" https://s1.51cto.com/wyfs02/M01/06/B8/wKiom1m83eWiQ4dGAAApJneF29U234.png-wh_500x0-wm_ 3-wmp_4-s_3332122659.png "title=" util. PNG "alt=" Wkiom1m83ewiq4dgaaapjnef29u234.png-wh_50 "/>
6.select statement:
650) this.width=650; "src=" Https://s5.51cto.com/wyfs02/M01/06/B8/wKiom1m836Tgd8ZfAABNgq0qP8A211.png "title=" Select. PNG "width=" "height=" 289 "border=" 0 "hspace=" 0 "vspace=" 0 "style=" WIDTH:500PX;HEIGHT:289PX; "alt=" Wkiom1m836tgd8zfaabngq0qp8a211.png "/>
This article is from the "13162997" blog, please be sure to keep this source http://13172997.blog.51cto.com/13162997/1965868
Conditions and looping statements used in shell scripts