Write a script, create a folder, enter a folder, and then use the loop to create a sequential file in the folder
Idea: 1. Create the specified folder and go to the folder
2. Specify a variable with a value of 0 to allow this variable to be recycled
3. Create one document at a time for Each loop until the end of the loop
Vim create.sh
#!/bin/bash
#written by Lizheng
#about Create File
CD ~
mkdir testfile
CD testfile
for ((i=0; i<10; i++)); Do
Touch Testfile_$i.txt
Done
650) this.width=650; "Src=" Http://s4.51cto.com/wyfs02/M02/8B/76/wKioL1hOvXXzEE10AAAdURUYe9c374.png-wh_500x0-wm_3 -wmp_4-s_1116217657.png "title=" 41.png "alt=" Wkiol1hovxxzee10aaaduruye9c374.png-wh_50 "/>
SH create.sh
650) this.width=650; "src="/e/u261/themes/default/images/spacer.gif "style=" Background:url ("/e/u261/lang/zh-cn/ Images/localimage.png ") no-repeat center;border:1px solid #ddd;" alt= "Spacer.gif"/>650 "this.width=650;" src= "http ://s2.51cto.com/wyfs02/m02/8b/76/wkiol1hovygxafytaaasuqgbjr0722.png-wh_500x0-wm_3-wmp_4-s_1472753806.png "title = "42.png" alt= "Wkiol1hovygxafytaaasuqgbjr0722.png-wh_50"/>
Shell scripting Exercises (12.12)