1. For loop
(1) Requirements: Can read, can change. Does not require to be able to write out completely without reference. Because embedded does not need to completely re-handwriting the shell, system administrator (server OPS, Application layer system-level management development needs to fully master the shell)
This will print 1 2 3 4 5 sequentially.
Print out the current catalog file
2. While loop
(1) There is no logical difference in the cycle of C language
(2) Be aware of a number of formatting requirements, such as: while the [] side of the [] have spaces on both sides, [] followed by a semicolon (if do on one line), i++ in the wording of the two-level brackets.
3. Echo's creation and append input file
(1) In the shell, you can use the Echo directive to create a new file and pass some content into the file. The key to creating a file and entering content is >.
(2) You can also use the echo command to append symbols >> append input to the end of an existing file.
A A.C file was created with the file content: Hello world!
(eight) loop structure in the shell