One: Regular expression
1. The difference between a wildcard and a regular expression
Wildcard characters *,? ,[]。
Difference:
Wildcard characters to match file names
The regular expression is to match the string
2. Meaning of ". *"
.: Any character
*: Matches the previous character any time
3. Filter out lines with a character
4. Filter out lines without a keyword
5. Show lines that begin with #
6. Display lines that are not in English at the beginning
7. Print o The row that appears two times
8. Show 0 One or more characters appear
9. Print lines that begin with R and end with N
Two: Variables
1. View of environment variables
2. Position variables
$1,$2,...... $9, respectively.
3. Pre-defined variables
4. Custom variables
Syntax format: name=[value]
Naming rules: Variable equals cannot have spaces on either side
Use export as a global variable
Called when using $.
Three: arithmetic operations
1. Syntax format
$ ((expression))
$[]
Expr
Four: Built-in judgment
1. Test expressions
2. Numerical comparison
-eq
-ne
-gt
-ge
-lt
-le
3. String test
=
! =
4. File Testing
-E: The file exists, it's true.
5. Logical operators
And! , or-O, not-a
6. Time
7. Find out which package the command comes from
V: Shell statement
1.for Control Statements
)
)
)
)
2.while Cycle
3 .....
。。。。。。
(The following will be completed next week)
Early preparation for big data on Shell basics