- VIM editor and script SHELL
- Because Linux everything is a file system, so editing the file is to configure the service.
-
Three modes VIM editor
-
Command Mode
-
Input Mode
-
Line mode
-
-
-
Three small practice, practice hand to configure the service.
- Essence: VIM with accurate set of parameters, and know the effect of each parameter for use.
-
Two operation modes SHELL script.
- Interactive (interactive): a command input immediately after execution.
- Batch (Batch): Complete the entire script execution.
-
How SHELL Scripting
- Ending in .sh
- The first line declares #! / Bin / bash
- # After just a comment, no other action.
- Then take command.
- How to perform? bash script
-
SHELL script can accept user run-time parameters
- For example, $ 0 corresponds to the name of the current Shell script, and $ # corresponds to the total number of parameters, $ * corresponds to the parameter values for all locations, $? Corresponds to display a command return value, and $ 1, $ 2, $ 3 ...... parameter values respectively corresponding to the N-th position.
-
Grammar test conditions
- [Conditional expression] have a space before and after #
- Success will return the number 0, otherwise it returns other random number.
-
classification
-
File test statement [-d / etc / fstab]
- Statement logic test
- Integer value comparison statements
- String comparison statement
-
Chapter VIM editor and script SHELL Day 4 July 17
Guess you like
Origin www.cnblogs.com/Black-cat0987/p/12046659.html
Recommended
Ranking