Exercise one: Write a simple progress bar with a shell script
The code is as follows:
650) this.width=650, "title=") ho7oa}6@[z~ @MTZJH2YZ (x.png "src=" http://s3.51cto.com/wyfs02/M00/82/F1/ Wkiom1dmv0nzcwgdaabjd93_rgs506.png "alt=" Wkiom1dmv0nzcwgdaabjd93_rgs506.png "/>
The results of the operation are as follows:
650) this.width=650; "Title=" R8e9c8c8{8_u2_ (352PJ} ' 9.png "src=" http://s1.51cto.com/wyfs02/M00/82/F0/ Wkiol1dmvdjbhlrlaaarwdffmvq201.png "alt=" Wkiol1dmvdjbhlrlaaarwdffmvq201.png "/>
Exercise two: If there are 3 numbers in a file, the maximum value of the three numbers, the minimum value, the and average of the three numbers.
The code is as follows:
650) this.width=650; "title=" jfztt$ ' 6zg@be6$[j6sc]99.png "src=" http://s2.51cto.com/wyfs02/M02/82/F1/ Wkiom1dmxcsdf9uraacizm8ojnm864.png "alt=" Wkiom1dmxcsdf9uraacizm8ojnm864.png "/>
The contents of the file:
650) this.width=650; "Title=" qn[rq~usf6b6xyq%lu]1t (f.png "src=" http://s5.51cto.com/wyfs02/M02/82/F1/ Wkiom1dmxlvykky5aaakrhtcidy531.png "alt=" Wkiom1dmxlvykky5aaakrhtcidy531.png "/>
The results of the operation are as follows:
650) this.width=650, "title=" gsb590l55kp~) re7x$0) rhg.png "src=" http://s3.51cto.com/wyfs02/M01/82/F1/ Wkiom1dmxg6ro2yxaaam4yxhz74349.png "alt=" Wkiom1dmxg6ro2yxaaam4yxhz74349.png "/>
Exercise three: Ask for 1 to 100 of the and
V1 version:
650) this.width=650, "title="%28k) 8{$Z][ds1y ' 7j1mzms.png ' src= ' http://s3.51cto.com/wyfs02/M01/82/F1/ Wkiom1dmxzaydltbaaagcd8p24a267.png "alt=" Wkiom1dmxzaydltbaaagcd8p24a267.png "/>
The results are as follows:
650) this.width=650; "title=" S[4~]4$t92mv7loy6ig4$07.png "src=" http://s4.51cto.com/wyfs02/M02/82/F0/ Wkiol1dmx3lxvrnfaaam2rbflbw627.png "alt=" Wkiol1dmx3lxvrnfaaam2rbflbw627.png "/>
V2 version: (Recursive version)
650) this.width=650; "title=" Rylj9r1a57 ') 5 ' S (f65s5.png "src=" http://s1.51cto.com/wyfs02/M00/82/F1/ Wkiom1dmyqhgof9daab4gabhqfi981.png "alt=" Wkiom1dmyqhgof9daab4gabhqfi981.png "/>
The results of the operation are as follows:
650) this.width=650; "Title=" C $ ({' 4zp$_lfz54m]o (fsb1.png "src=" http://s5.51cto.com/wyfs02/M01/82/F0/ Wkiol1dmyu7qzoq-aaajmqx0egc435.png "alt=" Wkiol1dmyu7qzoq-aaajmqx0egc435.png "/>
V3 version: required to print out 1+2+3+......+100=5050
650) this.width=650; "title=" $Y _wt[uf6wkpf1m[m1gx708.png "src=" http://s5.51cto.com/wyfs02/M02/82/F1/ Wkiom1dmynkrhhd2aabdg2rlnws242.png "alt=" Wkiom1dmynkrhhd2aabdg2rlnws242.png "/>
Operation Result:
650) this.width=650; "title=" Phiduntut$tdl_4qbnju}h7.png "src=" http://s3.51cto.com/wyfs02/M00/82/F1/ Wkiom1dmysztvyylaaaioswkpxi375.png "alt=" Wkiom1dmysztvyylaaaioswkpxi375.png "/>
Exercise four: Fibonacci sequence calculations
V1 Version: Recursive version
650) this.width=650; "Title="]s6a%wq_a (sc{) _{uu~q6vq.png "src=" http://s2.51cto.com/wyfs02/M00/82/F0/ Wkiol1dmy7mdmjftaabog8k5oi0999.png "alt=" Wkiol1dmy7mdmjftaabog8k5oi0999.png "/>
V2 version: Non-recursive version
650) this.width=650; "title=" ob~x44_hi3lak2_9r ' @B0IY. png "src=" Http://s3.51cto.com/wyfs02/M01/82/F0/wKioL1dmZByy_ Qgkaabtyvzql-k369.png "alt=" Wkiol1dmzbyy_qgkaabtyvzql-k369.png "/>
Run results
650) this.width=650; "title=" Mn{9~h03l[mb~5{1zd]zxpo.png "src=" http://s4.51cto.com/wyfs02/M01/82/F1/ Wkiom1dmzj-r8xvlaaaaqicymeg335.png "alt=" Wkiom1dmzj-r8xvlaaaaqicymeg335.png "/>
These are the simple exercises that you learn about shell scripting.
Code for the shell script exercise