1) This article is dedicated to people who insist on self-study
I converted from network management to a Linux OPS engineer and summed up some experience. Write him out in the hope that he can help more people.
2) This article introduces the basic theory of Shell programming in Linux
What is a shell script?
The shell is a shell of a Linux system that allows users to implement functions through its operating system.
A shell script is a file consisting of variables, commands, and control statements. Execute it through the shell to achieve some kind of effect.
b How to execute it?
There are three types of Linux:
/bin/sh Script Name
Full path/script name #此时脚本需要有执行权限
. Full path/script name #注意此方法执行后, the variables in the script will change to global
C Shell Script basic format (fixed format is a standard, in order to make their ideas clearer, but also for others to understand better)
#!bin/sh
Definition of a variable
Conditional control Statements
The theoretical foundation of Linux self-study _shell