Positional parameters, interactive scripting
Knowledge point 1:
Single-Step execution of bash (shows the entire execution process):
Bash-x/path/to/script (script)
Knowledge Point 2:
positional parameters:
/tmp/test.sh (script itself) 3 (script First parameter)
$: script itself
$: First script Parameter
$:
....
Special variables:
$#: Shows the number of all positional parameters $*,[email protected]: show references all positional parameters
knowledge point 3:
Interactive scripting:
Read variable: The value of the given variable can be null
Read-p: Tip Information
Give the variable a default value:
Varname=${varname:-value}
Returns the value of VarName if varname is not empty, or no side, returns value
If varname is not empty, its value is not changed, otherwise, VarName uses value as its value
13. Learning progress and tasks of self-study--linux "positional parameters, interactive scripts"