7.1 Creating and executing shell programs 148
7.2 Variables 149
7.2.1 Assigning a value to a variable 150
The shell uses "=" To assign a variable, or you can change or initialize the value of a variable with an equal sign.
7.2.2 Access Variable 150
7.3 Position parameter 150
Beijing
Is
A
Beautiful
7.4 Internal Variables 151
7.5 Special Characters 152
7.5.1 Double quotes 152
Double quotation marks refer to a string in which a space key can be used, such as assigning a value to a.
A= "ASP fgh jk1"
If you do not add double quotes, the system will think "a=asp" instead of a= "ASP fgh jk1"
7.5.2 Single quotation mark 153
7.5.3 Backslash 153
7.5.4 Anti-Quote 154
7.6 Comparison of Expressions 154
7.6.1 Comparison of expressions in Pdksh and bash environments 154
Comparison of expressions in 7.6.2 TCSH environment 157
7.7 Loop Statement 159
7.7.1 for Statement 159
7.7.2 While Loop statement 160
7.7.3 until statement 160
7.7.4 Repeat Statement 161
7.7.5 SELECT statement 161
7.7.6 Shift Statement 161
7.8 Item Statement 162
7.8.1 If statement 162
7.8.2 Case Statement 163
7.9 Jump Statement 165
7.9.1 Break Statement 165
7.9.2 Exit Statement 166
7.10 Functions 166
7.11 Integrated application of knowledge points in this chapter 167
7.11.1 General process for writing shell scripts 167
7.11.2 Shell Programming Example 168
7.11.3 of this chapter knowledge Point collation 174
7.12 Summary 174
Operation of Kali on the 7th chapter of the Linux Bingshu directory using the shell