Linux script creation

Linux script creation

1. The first step: the creation of .sh file Create a
new .sh file in the current folder, which is a shell script script file. Our script is to put many linux commands in this script file, and then run the .sh file directly
2 .Step 2: Script writing Write
the command into the .sh file according to the function you want to achieve
3. Step 3: Run the .sh file
in the current folder, right-click open in terminal to open the command window in the terminal, and enter'sh test.sh" to run the script
4. Note
If the .sh file is not in the current folder, you can use the cd command to enter the folder first, and then run the script, otherwise the script cannot be opened

Guess you like

Origin blog.csdn.net/qq_43511299/article/details/107852530